Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Darkdevil79 on March 11, 2015, 04:45:03 PM
-
Hi all , I moved over to unity 5 and tried to use some of my code for a item to a gird , but I keep getting this error
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
UnityEngine.Transform:set_parent(Transform)
NGUITools:AddChild(GameObject, GameObject) (at Assets/NGUI/Scripts/Internal/NGUITools.cs:511)
I had a look around but I could not find any info , so i thought I would let everyone know
-
You need to instantiate the game object before changing its hierarchy. You seem to be trying to change the parent of an object that exists as a prefab.
-
Thank you for the reply , I found out the error , I got the object mixed up (it was a late night coding) :-[ , so it was trying to add root 100 times
Not one of my finest monents