Author Topic: Unity4 active state problem  (Read 2494 times)

Sinner

  • Guest
Unity4 active state problem
« on: May 08, 2013, 05:07:39 AM »
Hello,
i'm having problems with game object's active states after upgrading to Unity4.

My GUI is split into many scenes. When i modify a part of the GUI, i go into one of those scenes, modify what ever i want to change and update the prefab (with PrefabUtility.CreatePrefab ( filePath, go, ReplacePrefabOptions.ReplaceNameBased )) - all those prefabs are used in the main game-scene where you can see all parts of the GUI at once.

Since upgrading to Unity4, i have the problem that after updating one of those prefabs with (PrefabUtility.CreatePrefab ( filePath, go, ReplacePrefabOptions.ReplaceNameBased ) the active states of the objects in that prefab in the main game-scene are randomly set active or inactive.

Have anyone an idea what could be the reason for that?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity4 active state problem
« Reply #1 on: May 08, 2013, 05:46:29 PM »
Unity 4 handles active objects differently. Each object has its own "active" flag, which gets cumulated in "activeInHierarchy". Consult Unity's documentation on the matter. This isn't an NGUI question.