playMaker

Author Topic: NullReferenceException with Properties[SOLVED]  (Read 2451 times)

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
NullReferenceException with Properties[SOLVED]
« on: March 29, 2013, 10:04:05 AM »
Hi,

I installed the latest version of playmaker today (1.5.4), but now when I try to create an action that sets the property of another object or component elsewhere, it comes up with a this error...

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.ReflectionUtils.GetMemberInfo (System.Type type, System.String path)

The set property action will work until I either open another scene or reopen Unity. Then it just deletes all of the settings within the set property action.
« Last Edit: April 01, 2013, 05:25:25 AM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: NullReferenceException with Properties
« Reply #1 on: March 31, 2013, 01:56:25 PM »
Are you referencing a scene object from a prefab? This is a limitation in Unity. You should use Find Object at runtime to find and store game object references.

But it shouldn't throw an error, I'll look into that...

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
Re: NullReferenceException with Properties
« Reply #2 on: April 01, 2013, 04:44:20 AM »
Yeah that's exactly what I was doing Alex, I didn't realise Unity couldn't do that. I managed to create a work-around with an FSM in the scene which works just fine :)

Thanks!