Search Unity

Are MonoBehaviours slow?

Discussion in 'Scripting' started by Yolon, Mar 14, 2016.

  1. Yolon

    Yolon

    Joined:
    Nov 16, 2014
    Posts:
    7
    Can adding many monobehaviour components to the game objects in the scene have a noticeable impact on performance?

    For example, I will probably have 100 objects in the scene with a couple of mono behaviours attached (Most of which do not implement Update()). Should I be concerned about perfomance?
     
  2. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,453
    In my opinion, you shouldn't really be concerned.

    Check out the Optimizing Scripts guide.
     
  3. ericbegue

    ericbegue

    Joined:
    May 31, 2013
    Posts:
    1,294
    It depends on how heavy your scripts actually are.
    In any case, the best way to know what is the performance impact, is to make some profiling.
     
    Kiwasi likes this.
  4. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    having 100 monobehaviours with no Update, is not slow. you shouldnt have a big fps hit from it