playMaker

Author Topic: Issue with Finger Gestures and PlayMaker  (Read 3831 times)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Issue with Finger Gestures and PlayMaker
« on: February 28, 2012, 02:48:10 PM »
So this is the error i get when i build to my iPad.. It all works when i run in the editor.

My first scene does not have any FG in it but my second one does.. When the second scene opens it runs and i can use the FG inputs to move the camera around but when i touch one of my objects this error pops up in xcode and it dies..

I tried a very simple project and it seems to work fine.. Now i was just thinking.. in my test i use FG inputs so i will remove that in case it has something to do with it

NullReferenceException
  at HutongGames.PlayMaker.Fsm.SendEventToFsmOnGameObject (UnityEngine.GameObject gameObject, System.String fsmName, HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Actions.SendEvent.OnEnter () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmState.OnEnter () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.ChangeState (HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName) [0x00000] in <filename unknown>:0
  at TBComponent.Send (.Message msg) [0x00000] in <filename unknown>:0
  at TBFingerDown.RaiseFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at TBInputManager.FingerGestures_OnFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) FingerGestures/FingerDownEventHandler:invoke_void__this___int_Vector2 (int,UnityEngine.Vector2)
  at FingerGestures.RaiseOnFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at FingerGestures.PerFinger_OnDown (.Finger source) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) FingerGestures/Finger/FingerEventDelegate:invoke_void__this___FingerGestures/Finger (FingerGestures/Finger)
  at FingerGestures+Finger.PostUpdate () [0x00000] in <filename unknown>:0
  at FingerGestures.UpdateFingers () [0x00000] in <filename unknown>:0
  at FingerGestures.Update () [0x00000] in <filename unknown>:0
  at TouchScreenGestures.Update () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Issue with Finger Gestures and PlayMaker
« Reply #1 on: February 28, 2012, 08:43:30 PM »
How should i set up PM for multiple scenes? Is there something special i am supposed to do? So i keep the PlayMakerGUI object persistent? And not have a new one in the new scene?

I just got a strange new error i have not scene that kind of let me to maybe some kind of conclusion like that?

The error is something like this:

MissingREferenceException: The object of type PlayMakerFSM has been destroyed but you are still trying to access it...

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Issue with Finger Gestures and PlayMaker
« Reply #2 on: February 28, 2012, 08:53:45 PM »
So i removed the PlayMakerGUI from my second scene and it fixed the error in my test scene but did not fix my main project. I get the same error still.. It is like something is not initializing  or is but in the wrong order maybe?

It sucks that simple projects are working fine.. And mine works in the editor too...

Q

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Issue with Finger Gestures and PlayMaker
« Reply #3 on: February 28, 2012, 10:44:44 PM »
I'm looking into this. A simple repro project would be very helpful. Either way, I should know more soon...

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Issue with Finger Gestures and PlayMaker
« Reply #4 on: February 28, 2012, 10:45:35 PM »
Ok i have run like 60 tests on this.. I think i have something now..

I use in my Template Send Event and GameObjectFSM... If i change that to FSMComponent and drag the FSM onto it then it works fine.. I just replaced the Template one with a new one in case there was some reference issue....... Nope it dies the same...

I have not upgraded to the new version yet.. I will do that now i guess.. 3.5 too i guess.

Anyway that is my end result. I assume i can just replace all those but it sucks as now my Template has to be customized.. before i just inserted it and it worked.. works fine in editor and it also works fine except when i am going from scene to scene for some strange reason..

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Issue with Finger Gestures and PlayMaker
« Reply #5 on: February 28, 2012, 11:01:42 PM »
Yes i just replaced all my Send Events that used GameObjectFSM on my one real object with the FSMComponent and that fixed it.. i was testing with separate test objects before trying to narrow it down.

My set up is i have an Input FSM that handles the input from Finger Gestures. It gets the event and the Event Info for the coordinates.. Then it sends events to my other 3 FSMs that i have on all of my interactive objects: Text - for pop up text windows like mouse overs, Color - highlights the object or an object, Animate - rotates a cover or door or runs an animation on some objects.

The FG inputs i use are: Finger down, Finger Up, Tap and Drag

I can test in my small test scenes if you want. See if i can replicate it there..

The strange thing is that it works in editor fine with my main menu and my object scene too in editor.. and also works with my object scene on the iPad with not main menu scene...

Q

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Issue with Finger Gestures and PlayMaker
« Reply #6 on: February 29, 2012, 12:58:11 AM »
hi,

 Yes I have this bug too, and it's a show stopper for the app currently as we can't reload the scene... :-\

 and I need the send event to be targeting gameObjectFsm...

Hopefully this will be adressed soon. I'll try to work out a repro if I have time, It's imply  matter of sending an event within the start state flow, it will break when reloading the scene ( my current understanding of the problem).

Bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Issue with Finger Gestures and PlayMaker
« Reply #7 on: February 29, 2012, 10:30:29 AM »
Ok well there is some happiness in numbers i guess.. I hope it is figured out soon. It killed my nice update to my client for his big reveal a the national sales meeting.. oh well.. it was a good test of our relationship i guess. He took it well and i gave him the best i could.

My work around for now is to use the FSMComponent instead. it seems to work fine for me but i hate using it as i have no idea when i go back what the Action does because you can not tell.

Off i go to upgrade to Unity 3.5

Q