Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,930
    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