playMaker

Author Topic: NullReferenceException  (Read 386 times)

3d_Artist1987

  • Beta Group
  • Full Member
  • *
  • Posts: 157
    • View Profile
NullReferenceException
« on: August 05, 2018, 11:44:22 PM »
Hi,

My playmaker FSM show this error.
(Unity Version - 2018.2.0f2, Playmaker version - 1.9.0.f5)

After this is not editable.

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmProperty.GetVariable () (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmProperty.cs:175)
HutongGames.PlayMaker.Actions.SetProperty.AutoName () (at G:/del/..../.../../Assets/PlayMaker/Actions/UnityObject/SetProperty.cs:43)
HutongGames.PlayMakerEditor.StateInspector.UpdateAutoSummarize (HutongGames.PlayMaker.FsmStateAction action)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3656
    • View Profile
    • jinxtergames
Re: NullReferenceException
« Reply #1 on: August 06, 2018, 02:26:52 AM »
Hi.
This is probably not a bug :)
There is a 'Set property' action that has an object missing.

or there is no object set in the action, or it gets removed somehow while playing.

Do you have errors in the PlayMaker window (bottom left)?
If so click on it to open the 'error check' then click on the error, it will bring you to the fsm/state with the error.

If not does this happen only when you play the game?
if so you need to try to find when and where.

3d_Artist1987

  • Beta Group
  • Full Member
  • *
  • Posts: 157
    • View Profile
Re: NullReferenceException
« Reply #2 on: August 07, 2018, 09:22:41 PM »
Hey,

Thanks for the reply.

When I select a state Which has set property actions its completely hang fsm window.
so I can't edit state.

In runtime also not clickable state.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3656
    • View Profile
    • jinxtergames
Re: NullReferenceException
« Reply #3 on: August 07, 2018, 11:33:07 PM »
Hi,
Did you update recently?

Can you update to the latest PlayMaker version?

If you do so please make a backup 1st.

Under playmaker/tools try "Update All FSM's in Build"

persabersa

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: NullReferenceException
« Reply #4 on: September 08, 2018, 03:13:40 AM »
I get the same, using the latest playmaker and unity 5.6.
When I do something like copy a UI button with a FSM with some set properties in it, and I want to edit those to what the new button should do I get the same error and the editor goes missing. Tools update fsm works but only to get the editor back, I still cant select that state with the set properties and change whats inside.
Its a little bit annoying, and I haven't seen that in older versions in playmaker when performing the same work flow.

per

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3656
    • View Profile
    • jinxtergames
Re: NullReferenceException
« Reply #5 on: September 16, 2018, 10:21:32 PM »
Hi.
Going over un-replied messages.

For which things you are using the set properties?

If possible you should change these with dedicated actions.
Get/set property actions are only there for 3rd party/custom scripts/assets which do not have actions (and even then it would be better to make custom actions for it)

let me know so i can see to make custom actions for it or redirect you to the usable actions instead.