playMaker

Author Topic: SendMessage losing gameObject  (Read 1783 times)

indy2005

  • Playmaker Newbie
  • *
  • Posts: 5
SendMessage losing gameObject
« on: September 30, 2013, 06:25:32 PM »
Hi,

I am using sendMessage action and am dragging the game object onto the inspector panel in the action.  I am then applying the changes back to the prefab object.  At runtime, the method is never being called, and when I explore the cloned objects at runtime, the sendMessage on the cloned prefab instances has no gameObject selected - as if the change wasnt replicated back to the prefab.

Any ideas appreciated.

i

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: SendMessage losing gameObject
« Reply #1 on: September 30, 2013, 07:58:42 PM »
Prefabs can't store references to scene objects. This is a limitation in Unity. So you need to find the scene object at runtime (e.g., using Find Game Object).