Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: LightSoftStudio on March 21, 2013, 11:31:27 AM
-
How can i solve this error i am getting, by the way this is the only error i have.
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.GameObject.GetComponents (System.Type type)
iTween.Stop (UnityEngine.GameObject target, System.String type) (at Assets/iTween/Plugins/iTween.cs:6436)
HutongGames.PlayMaker.Actions.iTweenFsmAction.OnExitiTween (HutongGames.PlayMaker.FsmOwnerDefault anOwner) (at Assets/PlayMaker/Actions/iTween/iTweenFsmAction.cs:64)
HutongGames.PlayMaker.Actions.iTweenMoveTo.OnExit () (at Assets/PlayMaker/Actions/iTween/iTweenMoveTo.cs:110)
HutongGames.PlayMaker.FsmState.OnExit ()
HutongGames.PlayMaker.Fsm.ExitState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.Stop ()
HutongGames.PlayMaker.Fsm.OnDisable ()
PlayMakerFSM.OnDisable ()
-
What is the context? What's going on in the scene?
-
I just get this error when i am trying to switch to a different scene, this is the only place i get this error.
-
Are you using Dont Destroy On Load anywhere?
-
I used to but i do not any more, and i still get this error.
-
also i find now it only happens rarely and all i added was a wait function before loading the next scene.
-
how can i fix this? how can i make it check if it is null? also what causes this error?
-
how can i fix this? how can i make it check if it is null? also what causes this error?
You need to figure out what is causing the error first.
-
I looks like it is crashing because it does not end itween functions in time, so how can i make it check if it is null?
-
Find the object that has the FSM which cannot find its target gameobject and go from there.
-
any other idea's, i check all of the fsm and they are fine
-
This is a itween problem how can it be solved?
-
solved all i have to do is stop the itween before a object gets destroyed.
-
Thanks for sharing the solution. I'll add this to the docs/tooltips.