Saving precomputed data about game objects in Unity3D

by Jakub Petriska   Last Updated September 11, 2019 23:13 PM

In my Unity3D game I have blocks of the environment that are placed by script into the scene. Each block has some bezier paths created with this asset. I can access all points of the paths when I place the block into the scene but I would like store start and end points of these paths somewhere and be able to retrieve this data before I place the blocks into the scene.

The only solution I can currently think of is creating a scene which would run a script that would place all these blocks into the scene, one after another, store the data in a file and this file would then be loaded before the game starts. However this solution feels kinda hacky.

Is there any better way to obtain and store this data in Unity? Is it even possible to create the file and load it when the game starts and also add it to the built game?

Tags : unity c# scripting

Related Questions

How does Unity call "update()" in the scripts?

Updated April 23, 2015 21:05 PM

Instantiating prefabs dynamically in script

Updated April 08, 2015 18:05 PM

DontDestroyOnLoad() doesn't work in Unity

Updated April 14, 2015 20:05 PM

Questions about scaling in a 2d game in unity

Updated April 20, 2015 22:05 PM

Is it safe StringToHash() to use in Unity?

Updated May 17, 2015 21:05 PM