Forum rules - please read before posting.

Prefab Instances - Save - Load

Hi,

I instances prefabs in Play Mode and I would like to save their transforms and presence in the scene. I've already read the manual about RememberTransform script and "Save scene presence" option, but the AC engine save only 1 prefab instance after I saved it. I don't know what could be the problem.

Other question: Can I put constantID or other Remember script to a Prefab instance in runtime?

Why did I ask these:
I use an other asset to build buildings in runtime, it has own save system, but I know I can't use that in AC, so I try to search a solution how can my game "remember" the elements of the building, what the player builds under Play Mode.

Comments

  • How many instances of the same prefab are you dealing with?

    It should be possible to save more than one instance at a time - so long as you enter in the prefab's Constant ID value into the Remember Transform component's "Linked prefab ConstantID" field.

    You'll need to share screens showing what you've got if you need more specific help, as I can only give general advice otherwise.

    Can I put constantID or other Remember script to a Prefab instance in runtime?

    Yes, such data should be restored after instances are added.

    I use an other asset to build buildings in runtime, it has own save system, but I know I can't use that in AC

    It would take some custom scripting, but if you are able to record such data into a string, then you can store that as a Global String variable in your save game files, and then use that to restore the state of your non-AC data upon loading. Such a technique is covered in this tutorial.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.