playMaker

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

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
Prefab not being saved 100%
« on: October 06, 2018, 09: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, 11:01:57 AM by miguelfanclub »

Farwest

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 63
Re: Prefab not being saved 100%
« Reply #1 on: October 06, 2018, 01:00:28 PM »
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

  • Sr. Member
  • ****
  • Posts: 480
Re: Prefab not being saved 100%
« Reply #2 on: October 06, 2018, 02:41:59 PM »
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, 02:47:38 PM by Thore »

miguelfanclub

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

Farwest

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 63
Re: Prefab not being saved 100%
« Reply #4 on: October 07, 2018, 10: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: 165
Re: Prefab not being saved 100%
« Reply #5 on: October 07, 2018, 11: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: 15500
  • Official Playmaker Support
Re: Prefab not being saved 100%
« Reply #6 on: October 08, 2018, 03: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: 165
Re: Prefab not being saved 100%
« Reply #7 on: October 08, 2018, 05: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: 165
Re: Prefab not being saved 100%
« Reply #8 on: October 08, 2018, 05:08:28 PM »
Adding as well:

Array variables dont get saved when prefab is applied.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Prefab not being saved 100%
« Reply #9 on: October 11, 2018, 04: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: 165
Re: Prefab not being saved 100%
« Reply #10 on: October 11, 2018, 07: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, 07:44:11 AM by miguelfanclub »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Prefab not being saved 100%
« Reply #11 on: October 18, 2018, 03:26:54 AM »
Hi,

 then no, it should not fail, if you are finding the gameobject at runtime, then the problem might be that your have a typo in the find gameobject action and it doesn't find your object.

 can you share screenshots of your action and hierarchy to check if it matches?

 Bye,

 Jean