playMaker

Author Topic: Prefab not being saved 100%  (Read 235 times)

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Prefab not being saved 100%
« on: October 06, 2018, 06:58:21 AM »
Drop Down menus in Actions (like to select a game object from the list) don't get saved when saving a prefab.

At least is happening with "Get Fsm String" Action. When changing the game object from the list, the change get not saved when you Apply the prefab.
« Last Edit: October 06, 2018, 08:01:57 AM by miguelfanclub »

Farwest

  • Playmaker Newbie
  • *
  • Posts: 32
    • View Profile
Re: Prefab not being saved 100%
« Reply #1 on: October 06, 2018, 10:00:28 AM »
Yes, I confirm that currently prefabs are not saved well and actions lose the attached gameobjects and components. I have same case for a long time with plenty different actions and I get used to this issue.

Therefore, I disable those Playmaker actions in prefabs (otherwise Playmaker gives warning of missing variables) and when I move the prefabs to hierarchy again, I have to add those gameobjects and other data each time.

For example Set Property is always losing its data or attached gameobject when its Owner object is saved as Prefab.

This issue is surely decreasing the work efficiency, I hope this can be solved soon with patches.

Thore

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Prefab not being saved 100%
« Reply #2 on: October 06, 2018, 11:41:59 AM »
Afaik, it's working as intended and is the same with scripts. For the specific issue with Get and Set Property, you must use the Linker Wizard.

I remember that I had the same issue at first. I ever since design my FSMs without any drag/drop reliances. Get owner, get parent and such are your friend. When I need references to a script, I learned to write a custom action for this (if there isn't any on Ecosystem). Some good tutorials are here in the forum how to do the basic stuff like getting and setting basic properties.
« Last Edit: October 06, 2018, 11:47:38 AM by Thore »

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Prefab not being saved 100%
« Reply #3 on: October 07, 2018, 03:53:39 AM »
Yes, still, when using game objects variables (no drag) is not getting saved when you apply the prefab.

Farwest

  • Playmaker Newbie
  • *
  • Posts: 32
    • View Profile
Re: Prefab not being saved 100%
« Reply #4 on: October 07, 2018, 07:43:02 AM »
Afaik, it's working as intended and is the same with scripts. For the specific issue with Get and Set Property, you must use the Linker Wizard.

I remember that I had the same issue at first. I ever since design my FSMs without any drag/drop reliances. Get owner, get parent and such are your friend. When I need references to a script, I learned to write a custom action for this (if there isn't any on Ecosystem). Some good tutorials are here in the forum how to do the basic stuff like getting and setting basic properties.

Once I remember, I had to use Get Owner>Get Parent>Get Sibling>Get Sibling's Parent>Get Parent> Get Parent>Get Parent's Parent again etc... kind of messy/silly finding when prefab's hierarchy link or position was really very crucial.

I really don't want to use so many plugings for each issue we face in playmaker or unity. But thanks for sharing the Link Wizard, although I am unsure if I am ever going to use it. It will be nicer if Playmaker devs create a fix for this issue sooner or later.

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Prefab not being saved 100%
« Reply #5 on: October 07, 2018, 08:10:54 AM »
@Farwest
The are ways to solve that. The easiest one is to use the "Find Game Object" action and store the game object you want to drag into a variable and then use it. That way you wont lose the link never when using prefabs.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13401
  • Official Playmaker Support
    • View Profile
Re: Prefab not being saved 100%
« Reply #6 on: October 08, 2018, 12:39:38 AM »
Afaik, it's working as intended and is the same with scripts. For the specific issue with Get and Set Property, you must use the Linker Wizard.

I remember that I had the same issue at first. I ever since design my FSMs without any drag/drop reliances. Get owner, get parent and such are your friend. When I need references to a script, I learned to write a custom action for this (if there isn't any on Ecosystem). Some good tutorials are here in the forum how to do the basic stuff like getting and setting basic properties.

Once I remember, I had to use Get Owner>Get Parent>Get Sibling>Get Sibling's Parent>Get Parent> Get Parent>Get Parent's Parent again etc... kind of messy/silly finding when prefab's hierarchy link or position was really very crucial.

I really don't want to use so many plugings for each issue we face in playmaker or unity. But thanks for sharing the Link Wizard, although I am unsure if I am ever going to use it. It will be nicer if Playmaker devs create a fix for this issue sooner or later.

Hi,

 well, Unfortunatly, the linker wizard is actually a help to what you would actually have to do manually, even without PlayMaker, AS soon as you use Reflection ( with or without PlayMaker), you will have a problem with the Unityt compiler, and using the linker.xml description is mandatory, so the linker wizard is actually a great help that will prevent you many headaches and waisted hours trying to figure out what class you need and most importantly what to write in the linker.xml file ( the right namespace, class, etc etc)

It's not a question of fix, it's the way Unity works :)

 Bye,

 Jean

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Prefab not being saved 100%
« Reply #7 on: October 08, 2018, 02:51:01 AM »
So what about the original post question:

When changing a game object variable in the drop down list of the "Get Fsm String" (to select the game object to get from) is not being saved when you apply the prefab.

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Prefab not being saved 100%
« Reply #8 on: October 08, 2018, 02:08:28 PM »
Adding as well:

Array variables dont get saved when prefab is applied.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13401
  • Official Playmaker Support
    • View Profile
Re: Prefab not being saved 100%
« Reply #9 on: October 11, 2018, 01:11:27 AM »
So what about the original post question:

When changing a game object variable in the drop down list of the "Get Fsm String" (to select the game object to get from) is not being saved when you apply the prefab.

is it not because the gameobject reference is a scene object? you can't reference scene objects outside a prefab asset hierarchy

 can you confirm this?

Bye,

 Jean

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Prefab not being saved 100%
« Reply #10 on: October 11, 2018, 04:14:29 AM »
Is a scene object on a variable, so there are no drags from the hierachy.
Also, this variable is get on the START using "Find game Object".

It shouldnt fail right?
« Last Edit: October 11, 2018, 04:44:11 AM by miguelfanclub »