Search Unity

How can i acces Sceneobjects in Mecanim/Statemachinebehaviour scripts

Discussion in 'Scripting' started by gambitslacklines, Aug 23, 2015.

  1. gambitslacklines

    gambitslacklines

    Joined:
    Feb 23, 2015
    Posts:
    14
    Hi togehter,

    i need to activate and deactivate gameobjects out of the Mecanim.

    I use Statemachinebeviours and deactivating works fine.

    If iam trying to set the gameobjects back to active simply nothing happens, the objects stay deactivated.

    Anyone knows how to do this ?

    Greets
     
  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    As long as those objects are a child of the object with the animation, it works just fine.