Is there a way to spawn whole actor from save?

Greetings! I know basics of save/load but I want to simplify my life (as we all) :slight_smile:

I can save whole actor to SaveGame, but how I can spawn actor from SaveGame as a whole piece, without iterating through each actor variable?

1 Like

If you’re doing it with the save game, you have to save everything yourself, and load it all back in again.

If you want to be able to just say ‘save this actor with all its settings’, then you’ll need a plugin, like

or

Thnx! Im using RAMA now. Its good but it behave weird :slight_smile:
RAMA is OK to save array of references but is NOT OK to save reference as a single variable.
Ive asked this questions in plugin discussion and on store page. Waiting for an answer.

And I dont know C++ to use Savior :slight_smile:

I’ve never used RAMA, but I’m pretty sure it can save single variables in actors :slight_smile:

Also, Savior is also exposed to blueprints.

You could be having a problem, because saving references is just not a good idea.

A reference is a dynamic variable, the value could very well not be the same the next time you run the game.

About RAMA I ment it saves “array of references” variables. But It refuses to save “single reference” variable. :slight_smile:

If that so I will try it :slight_smile:

1 Like

Like I say, don’t save references. It probably won’t work with any other save plugin.

Can you give an example of when you would save a reference?

Saving references is the main reason to use any plugin at first the place :slight_smile:

I mean I can save variables but I need to save reference on objects inside save.

For example in my project I build space ships block by block. And each block hold references to all connected blocks.
So I need to store this ship. Ship holds references on own components only, meaning it is possible to incapsulate references inside save.

1 Like

That’s what I thought. I think your problem is saving references, not the RAMA plugin.

If block type A has block type B attached, it can remember the class of the attached block.

If you can’t work with class, then working with actor tags is another method. Remember the tag of the attached actor.

Using references will not work in the long run, especially when you package, I suspect.

RAMA saves entire actor so thats good for me.
I may kinda found work around with references - I want to generate my own GUIDs for every object and then restore references by this GUIDs.

Do you think this is feasible way?

That might work, depending on how you do it :slight_smile:

I already did this for references that RAMA refuse to save:

If GUID invalid (new object, not from save) - Assign GUID as variable that RAMA can save with object

Then in objects that hold reference Im saving not only reference but also GUID

And on the load I restore reference by GUID:

Ok, that looks pretty good :slight_smile:

Are you saying it won’t save these GIDs?

It will :slight_smile:
What I ment is - I wanna pay money to plugin developer to do this for me )))))
I dont want to store GUIDs. I dont need them. They are only for save/load :slight_smile:

1 Like

It doesn’t matter which plugin you use, saving actor references will never work, because they are generated at runtime :slight_smile:

You are wrong )))
I will make video a show you how this work in RAMA (but in a strange way) :slight_smile:

1 Like

Don’t worry about it :slight_smile:

It does work - sometimes - , but you can’t rely on it.

You can take a look around the forums, people ask this question ( why can’t I save actor refs ) about once a month.

Many different people have answered the same thing. Don’t save references :slight_smile:

1 Like

Ok, Understood :slight_smile:

Crap )))
I just checked. Its not RAMA that save references… Its my block spawn and snapping logic. :slight_smile:
Blocks start to snap to each other the moment blocks appears in the world :slight_smile:

So, as you sad. There is no reference save in RAMA. :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.