playMaker

Author Topic: (SOLVED)Smooth Save - loading array only loads one gameobject  (Read 774 times)

SawyerK

  • Junior Playmaker
  • **
  • Posts: 92
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

when i press save game, It seem like it saves the gameobject array correctly


But when i load the game, it load in only one for all of the gameobjects.


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.
« Last Edit: July 19, 2021, 08:52:06 AM by SawyerK »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Smooth Save - loading array only loads one gameobject
« Reply #1 on: July 18, 2021, 03:41:08 PM »
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.

SawyerK

  • Junior Playmaker
  • **
  • Posts: 92
Re: Smooth Save - loading array only loads one gameobject
« Reply #2 on: July 19, 2021, 08:51:27 AM »
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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: (SOLVED)Smooth Save - loading array only loads one gameobject
« Reply #3 on: July 21, 2021, 07:16:42 AM »
Hi.
No problem, and your now wasting my time :)