playMaker

Author Topic: PlayMaker Null Problem [SOLVED]  (Read 4851 times)

LightSoftStudio

  • Guest
PlayMaker Null Problem [SOLVED]
« 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 ()
« Last Edit: March 22, 2013, 11:08:47 PM by Alex Chouls »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2501
  • Mender of the past
    • View Profile
    • Cleverous
Re: PlayMaker Null Problem
« Reply #1 on: March 21, 2013, 11:34:32 AM »
What is the context? What's going on in the scene?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #2 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.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2501
  • Mender of the past
    • View Profile
    • Cleverous
Re: PlayMaker Null Problem
« Reply #3 on: March 21, 2013, 11:52:12 AM »
Are you using Dont Destroy On Load anywhere?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #4 on: March 21, 2013, 11:54:53 AM »
I used to but i do not any more, and i still get this error.

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #5 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.

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #6 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?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2501
  • Mender of the past
    • View Profile
    • Cleverous
Re: PlayMaker Null Problem
« Reply #7 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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #8 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?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2501
  • Mender of the past
    • View Profile
    • Cleverous
Re: PlayMaker Null Problem
« Reply #9 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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #10 on: March 21, 2013, 10:02:49 PM »
any other idea's, i check all of the fsm and they are fine

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #11 on: March 21, 2013, 10:13:30 PM »
This is a itween problem how can it be solved?

LightSoftStudio

  • Guest
Re: PlayMaker Null Problem
« Reply #12 on: March 22, 2013, 09:24:18 AM »
solved all i have to do is stop the itween before a object gets destroyed.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3893
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: PlayMaker Null Problem
« Reply #13 on: March 22, 2013, 11:08:32 PM »
Thanks for sharing the solution. I'll add this to the docs/tooltips.