Saving a variable from construction script?

Hello Tokodboy,

You can use the game instance to do this. I answered another very similar question earlier. That was a variable with a single value but with an array is practically the same method:

If you have trouble, just ask!

Hy!

There is any method to save a variable (a whole array) from construction script?
My construction script fill an array with comoputed datas and after a construction script is ran I want to save this array to further use.
Example: I dont want to compute the array data in each construction script run rather than I want to use the saved array.

1 Like

Thx.

The solution for my problem was the save game function.
As You suggest I tried the game instance method but as I can see the game instance only works while the editor or the game is running.

1 Like