Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: LightSoftStudio on March 21, 2013, 11:31:27 AM

Title: PlayMaker Null Problem [SOLVED]
Post 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 ()
Title: Re: PlayMaker Null Problem
Post by: Lane on March 21, 2013, 11:34:32 AM
What is the context? What's going on in the scene?
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 11:49:22 AM
I just get this error when i am trying to switch to a different scene, this is the only place i get this error.
Title: Re: PlayMaker Null Problem
Post by: Lane on March 21, 2013, 11:52:12 AM
Are you using Dont Destroy On Load anywhere?
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 11:54:53 AM
I used to but i do not any more, and i still get this error.
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 12:02:36 PM
also i find now it only happens rarely and all i added was a wait function before loading the next scene.
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 03:27:34 PM
how can i fix this? how can i make it check if it is null? also what causes this error?
Title: Re: PlayMaker Null Problem
Post by: Lane on March 21, 2013, 03:34:02 PM
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.
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 03:48:39 PM
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?
Title: Re: PlayMaker Null Problem
Post by: Lane on March 21, 2013, 04:41:42 PM
Find the object that has the FSM which cannot find its target gameobject and go from there.
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 10:02:49 PM
any other idea's, i check all of the fsm and they are fine
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 21, 2013, 10:13:30 PM
This is a itween problem how can it be solved?
Title: Re: PlayMaker Null Problem
Post by: LightSoftStudio on March 22, 2013, 09:24:18 AM
solved all i have to do is stop the itween before a object gets destroyed.
Title: Re: PlayMaker Null Problem
Post by: Alex Chouls on March 22, 2013, 11:08:32 PM
Thanks for sharing the solution. I'll add this to the docs/tooltips.