Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SawyerK on July 18, 2021, 12:14:38 PM
-
Hi!
I use Smooth Save for Playmaker. Only problem i cant seem to figure out how to solve is the runtime initiated prefabs.
I set a unique name for every prefab that is created runtime by adding a number at the end of the item's name
(https://i.postimg.cc/R02BL03J/smoothsave_indentification1.jpg)
when i press save game, It seem like it saves the gameobject array correctly
(https://i.postimg.cc/kXy7P9HL/smoothsave_indentification2.jpg)
(https://i.postimg.cc/FHWm1pNZ/smoothsave_indentification3.jpg)
But when i load the game, it load in only one for all of the gameobjects.
(https://i.postimg.cc/xdXQmmdS/smoothsave_indentification4.jpg)
(https://i.postimg.cc/XY74VmSq/smoothsave_indentification5.jpg)
The same system works with gameobjects/prefabs that are already in the scene when the game sarts, but doesn't work with runtime created prefabs.
I have run out of idea what to do here, they have a unique name so it should save it and load it.
What could be the problem?
Thank you.
-
Hi.
Probably its not possible to save runtime created prefabs
maybe instead of saving prefabs you could save the prefab names/positions/rotation.
Then on load create the prefab and set position/rotation/other data.
-
Thank you for the help djaydino!
The problem was with Smooth Save.
If anyone using Smooth Save don't use keys for arrays it doesn't work.
Deleted the keys and now it works perfectly.
Thank you for all the help and sorry for wasting your time djaydino. :D
-
Hi.
No problem, and your now wasting my time :)