Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: joduffy on November 30, 2013, 08:31:34 AM
-
Hi Guys,
I am getting this error when using the set parent action in playmaker:
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
UnityEngine.Transform:set_parent(Transform)
HutongGames.PlayMaker.Actions.SetParent:OnEnter() (at Assets/PlayMaker/Actions/SetParent.cs:38)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean)
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData)
HutongGames.PlayMaker.Fsm:BroadcastEventToGameObject(GameObject, FsmEvent, FsmEventData, Boolean, Boolean)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent)
HutongGames.PlayMaker.Actions.SendEvent:OnEnter() (at Assets/PlayMaker/Actions/SendEvent.cs:39)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:Start()
PlayMakerFSM:Start()
Is this due to the new unity3d update?
-
It looks like you're trying to run it on a prefab reference. It will only work on a scene object...
-
Thanks Alex,
I figured out the problem. I would create a gameobject from a prefab and then I wanted to set the parent of the created prefab.
The problem was I forgot to store the newly created gameobject so my set parent was pointing to the prefab instead.