Search Unity

[Solved] When instantiating a game object, what MonoBehavior is called?

Discussion in 'Scripting' started by asperatology, May 31, 2015.

  1. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    976
    It's the opposite equivalent of MonoBehavior.OnDestroy(). When the game object is created, it should trigger an On...() method in MonoBehavior.

    What method is that? Thanks in advance.
     
  2. Duugu

    Duugu

    Joined:
    May 23, 2015
    Posts:
    241
  3. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    976
    Ah, so it's not an On...() method. Thanks!
     
  4. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Also U might be looking for OnEnabled() . Awake is called too ofc.
     
  5. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,481
  6. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    976
unityunity