Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: escpodgames on June 05, 2013, 02:59:51 AM
-
Have been having this issue today where If I select a state it greys out the playmaker window and that FSM is now un touchable until I restart Unity ... but if I select it again the same thing happens :(
the error I'm getting is -
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMakerEditor.ActionEditor.EditFsmVar (System.Object fieldValue, System.Object[] attributes)
HutongGames.PlayMakerEditor.ActionEditor.GUIForFieldTypes (System.String labelText, System.Type type, System.Object fieldValue, System.Object[] attributes)
HutongGames.PlayMakerEditor.ActionEditor.EditField (System.Object obj, System.Reflection.FieldInfo field, System.String labelText, System.Type fieldType, System.Object fieldValue, System.Object[] attributes)
HutongGames.PlayMakerEditor.ActionEditor.EditField (HutongGames.PlayMaker.FsmStateAction action, System.Reflection.FieldInfo field)
HutongGames.PlayMakerEditor.ActionEditor.DrawDefaultInspector (HutongGames.PlayMaker.FsmStateAction action)
HutongGames.PlayMakerEditor.ActionEditor.OnGUI (HutongGames.PlayMaker.FsmStateAction action)
HutongGames.PlayMakerEditor.StateInspector.DoActionGUI (HutongGames.PlayMaker.FsmStateAction action)
HutongGames.PlayMakerEditor.StateInspector.DoActionsListGUI (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMakerEditor.StateInspector.DoActionsPanel ()
HutongGames.PlayMakerEditor.StateInspector.OnGUI ()
HutongGames.PlayMakerEditor.InspectorPanel.OnGUI (Rect area)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI ()
FsmEditorWindow.OnGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:93)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
It's like aids and it spreads to other states :S
-
Hi,
what action is on that state? it's using fsmvar, so it's likely that the code is not checking if the var is set or not. or maybe it's a list of var and the index is out of bounds.
bye,
Jean
-
It has 4 ArrayListGet action ... unfortunately I can't fix the issue as I can't select the state :P
I copied all the states and pasted them into another FSM and now another state (which didn't have ArrayListGet is doing the same thing) but it has an ArrayListremove action ... and when I delete it and paste it into another FSM it doesn't break. So at a pure guess its an array issue :S
-
Hi,
I think I know the issue, it's the serialization of the action that is now obsolete, as it's likely happened after you updated arrayMaker and the action has changed it's public interface.
Could you send me the project, or just the scene? or is it too big?
bye,
Jean
-
Ill try to chop it down and send you the scene :)
-
Hi,
Can you download the latest ( I just updated), and see if it improves the situation?
https://hutonggames.fogbugz.com/default.asp?W715
bye,
Jean
-
Just updated to the latest but I still get the issue and this error message
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[FsmTemplate,System.String].Add (.FsmTemplate key, System.String value) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
HutongGames.PlayMakerEditor.FsmEditorUtility.AddTemplateToCategory (.FsmTemplate template, System.String category)
HutongGames.PlayMakerEditor.FsmEditorUtility.CategorizeTemplates ()
HutongGames.PlayMakerEditor.FsmEditorUtility.BuildTemplateList ()
HutongGames.PlayMakerEditor.FsmEditor.OnProjectChange ()
FsmEditorWindow.OnProjectChange () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:338)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnProjectChange ()
If you still want my scene I can send it to you.
-
Hi,
yes please, that will help me
bye,
Jean
-
Hi Jean,
As discussed here is the file - If you select the state called "Setup_Arrays " on the Level_Manager gameobject parented to _Managers ("Game"FSM)
Hope that helps - I have rebuilt all of this and its working fine in my new scene but still an issue to be resolved fingers crossed :)
Removed file - let me know if you didn't get it Jean :)
-
Hi,
sorry, did not get it :) pm me the file, thanks.
bye,
Jean