Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animator automatically play a none-default state???

Discussion in 'Scripting' started by JohnSonLi, Dec 12, 2018.

  1. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    I hava an animator attached to my game object, and this animator controller does not have a default state(I set default to an empty state). But it is strange that it automatically plays a state. Unless I set animator.enabled = false in Awake.
    Is it normal??Or I did something wrong??
     
  2. Yes. You haven't shown us what you have. Also this question is better suited in the Animation topic.
     
  3. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    I set a game object to be disactive but soon it become active again. I can only deactivate it after deactivating its animator. So I think animator must play something to activate it. But I never play any state...hmmm.......it is so strange