playMaker

Author Topic: What specifically causes scene linked objects to dissociate?  (Read 2024 times)

QFGlenn

  • Playmaker Newbie
  • *
  • Posts: 30
What specifically causes scene linked objects to dissociate?
« on: December 07, 2015, 09:38:40 PM »
Hi there.

I'm in the process of going through the FSMs for the new project and editing and optimizing them. The error list through Playmaker is something that I am really benefiting from.

However I noticed that when I navigate through the error list, that is to say when I click on an object in the error list to review and repair it, it seems that all the objects in my scene lose their scene assigned value.

To be clear, I mean the other developer on my team is just dragging objects into the state and variable tabs of Playmaker to build. Needless to say I'm adding in Find Object/Find Child to these as I go along.

My question is why do these FSMs links break when I go through the error log? And what, if anything else, could cause this issue? Is this a bug?

Thanks for your time.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: What specifically causes scene linked objects to dissociate?
« Reply #1 on: December 07, 2015, 10:09:13 PM »
Prefabs can't store scene references (this is a Unity limitation) so that may be what you're seeing.

Templates are also assets like prefabs, so cannot store scene references.

Re-hooking up the scene references won't help since they'll be lost when you restart Unity. Instead you have to find the scene objects at runtime (e.g., using Find Object) and store them in a variable. Sounds like you're doing that now?

Can you confirm that this is what you're seeing?

QFGlenn

  • Playmaker Newbie
  • *
  • Posts: 30
Re: What specifically causes scene linked objects to dissociate?
« Reply #2 on: December 07, 2015, 11:49:35 PM »
Well I am definately doing all the dirty work of properly associating the variables, and I understand the limitations of the game engine, but my experience is that as long as I stay in the same scene where the references were made they don't break. That is at least until now.

That's why I'm confused when I click through the playmaker error log and all of a sudden they begin to break. I can click on the FSM in the hierarchy and edit and modify all I like, but in the error log it seems to break them.

I'm wondering if there's any other features of Playmaker that either clear these references or try to recall them.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What specifically causes scene linked objects to dissociate?
« Reply #3 on: December 08, 2015, 12:48:47 AM »
Hi,

 If you are using prefabs, indeed you can break connections even without leaving the scene, for example if you click Apply on a prefab instance.

But it seems that you are loosing connection while playing or debugging, which is indeed not something that should happen, unless the gameobject you are referencing is getting deleted and recreated or something along these lines.

 Bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: What specifically causes scene linked objects to dissociate?
« Reply #4 on: December 08, 2015, 01:50:58 AM »
Can you record a video of what's happening?
What does the error in the Playmaker console say?

QFGlenn

  • Playmaker Newbie
  • *
  • Posts: 30
Re: What specifically causes scene linked objects to dissociate?
« Reply #5 on: December 08, 2015, 06:11:14 PM »
Here is a video I just made. I can't upload it to the forum because of the size limit. Here is a link. https://drive.google.com/open?id=0B0ZOqxcNb9NsczV6d0dsbW83ZWs  I hope this is good enough.

Anything else I can do just let me know.

I want you to know how much I love Playmaker, and how much I appreciate your hard work, and your patience with helping me.

QFGlenn

  • Playmaker Newbie
  • *
  • Posts: 30
Re: What specifically causes scene linked objects to dissociate?
« Reply #6 on: December 08, 2015, 07:27:21 PM »
One mor ething that I'd like to add is that even though Unity doesn't store scene variables, the connections will not break if the target object is a direct parent or child.

So there is at least SOME ability to retain these scene assigned values.

[EDIT] Oh, also, if the objects share the same parent, it also carries over.

[EDIT2] One more thing. If playmaker is open, and I use ctrl Z they also break sometimes. Maybe that was a one time thing?
« Last Edit: December 08, 2015, 08:00:30 PM by QFGlenn »