playMaker

Author Topic: Null Ref Error(Edited)  (Read 2742 times)

kronas

  • Playmaker Newbie
  • *
  • Posts: 2
Null Ref Error(Edited)
« on: June 27, 2013, 09:58:23 AM »
I have a simple prefab created with my character, two cubes that are used for waypoints to patrol, and one large cube used a a trigger to tell that character to chase after the player. When I have this prefab in the scene by himself there are no problems. However when I place that prefab into another prefab within the scene I start getting constant Null Ref errors, all coming from iTween.

Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
iTween.RetrieveArgs () (at Assets/Plugins/iTween/iTween.cs:6788)
iTween.Awake () (at Assets/Plugins/iTween/iTween.cs:6538)
UnityEngine.GameObject:AddComponent(String)
iTween:Launch(GameObject, Hashtable) (at Assets/iTween/Plugins/iTween.cs:6740)
iTween:MoveTo(GameObject, Hashtable) (at Assets/iTween/Plugins/iTween.cs:1448)
HutongGames.PlayMaker.Actions.iTweenMoveTo:DoiTween() (at Assets/Scripts/PlayMaker/Actions/iTween/iTweenMoveTo.cs:177)
HutongGames.PlayMaker.Actions.iTweenMoveTo:OnEnter() (at Assets/Scripts/PlayMaker/Actions/iTween/iTweenMoveTo.cs:106)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:Start()
PlayMakerFSM:Start()

The only place I am using iTween is within some of the playmaker scripts I have made. The Playmaker script simply uses iTween Move To to move to one point and once it gets there it uses it again to move back. Once the character enters the trigger collider it then goes into the chase state where I use iTween Move Update to move toward the player. The players object is stored in a global variable and the chase script uses that global variable. The other two points used for the pathing are just cube objects within the prefab of the character.

Has anyone run into this before, or have any ideas as to what might be causing the issue? Also if you need any additional information just let me know and I will get you anything you need.

Edit: Found a different error reference which I think may better display the issue that is happening.

Thanks
« Last Edit: July 01, 2013, 10:52:01 AM by kronas »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Null Ref Error(Edited)
« Reply #1 on: July 02, 2013, 02:46:38 AM »
Hi,

 Have you filed a but report using playmaker/tools menu? I recall something, but I can't trace it back. Maybe Alex has a memory of this issue.

bye,

 Jean

kronas

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Null Ref Error(Edited)
« Reply #2 on: July 02, 2013, 08:49:21 AM »
Hey, yes I did report this error using the playermaker submit bug option within Unity. Haven't heard anything back on it yet. Also now I am getting a slightly different error, yet I haven't changed anything with this prefab. Also I removed everything from within the playmaker FSM on that prefab and I was still getting the same errors. I am starting to think that this just may be something with Unity's meta data or cached data.