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. Dismiss Notice

"GameObject is active but a parent is inactive. Active state is now inherited." warnings

Discussion in 'Editor & General Support' started by JJC1138, Mar 12, 2015.

  1. JJC1138

    JJC1138

    Joined:
    Feb 23, 2012
    Posts:
    89
    Hello.

    Since upgrading my project to Unity 5 I've been getting the following console warning whenever loading some of my scenes (in edit or play mode):
    GameObject is active but a parent is inactive. Active state is now inherited. Change the parenting to get back the old behaviour!

    (This was reported by others a couple of times in the beta forum, but since those threads are locked and I have a bit of new information I thought I'd make a post here too.)

    Obviously the warning is a bit weird, because it's describing behavior that was new in Unity 4, but I've only been getting it since upgrading to Unity 5. I thought that maybe re-saving the scenes in Unity 5 would stop the warnings from appearing, but I've done so and that hasn't made any difference, so this seems like a bug to me.

    I've tracked it down to occurring only for active instances of prefabs that have an inactive parent, and where the instance has an added component (any one seems to work) that is not on the prefab. Here's a screenshot of a setup that triggers it (note the bold 'Mesh' label showing that the Mesh Filter component wasn't on the prefab):
    Screen Shot 2015-03-12 at 20.10.00.png
    I've filed a bug with a minimal test project (the above setup) as case 679993, but I thought I'd post here for anyone else who's searching for a solution. Has anyone figured out a way of getting those warnings to go away?
     
    malkere likes this.
  2. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I've submitted a very similar repro earlier and got a mail back a week ago that this has been fixed (in a future version I guess).
     
    JJC1138 likes this.
  3. JJC1138

    JJC1138

    Joined:
    Feb 23, 2012
    Posts:
    89
    Oh great, I'm very glad to hear that. Thank you! :)
     
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    The warning is harmless but annoying, the fix is in queue for being included in a patch release, maybe patch 3 or patch 4
     
    malkere and JJC1138 like this.
  5. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,209
    somehow this unlinked all my public variable for the prefab in question =[
    which is my mainUI which has about 100. I just have to reassign em, but it's a bummer.
     
  6. JJC1138

    JJC1138

    Joined:
    Feb 23, 2012
    Posts:
    89
    This was fixed in 5.0.0p2. From the release notes:
    You have to re-save your scenes that were giving the warnings, and then loading them again is fine!