0
\$\begingroup\$

In Unity the PhysicsManager has project data. It exists across scenes but its data is unique to each project. If it make my own CustomManager, where/how to I store its data so that it's associated with the project, not a particular scene.

Most of the examples show storing data in properties in components on GameObjects but the PhysicsManager is not a component of a GameObject as far as I can tell. I want my custom manager to do whatever PhysicsManager is doing to store its data.

Any examples, pointers, links to articles?

\$\endgroup\$
1
\$\begingroup\$

Depending on the amount of data you have to store PlayerPrefs should be perfect for that. If player prefs is not enough or does not suits your needs you can store project custom data in a text file (personally i place it in resources but it could be anywhere) and read it when needed

for ex : i made a plugin for unity to define different sizes atlases path, and everything is stored in a textfile where i have some JSON arrays, and when i load my scene i read my file and forget about it

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.