I am developing for Android.In my game data is in objects which aren't derived from MonoBehaviour.So I am using binary serializer and taking references from the gameobject.It works, but I have too many variables to save most of variables are in script attached to gameobject Gamemanager So I made a prefab of gameobject of Gamemanager and saved it using prefabutility and load it again It works but Can someone tells me whether this is right approach or not, please??
Asked
Active
Viewed 475 times
1
-
1[GameDev Stack Exchange](http://gamedev.stackexchange.com) would be a better location fr these sort of things. Also check out the [Unity Forums](https://forum.unity3d.com/). As a concept, there's nothing wrong with using Prefabs (as far as I'm aware) regardless of platform, but as a data container Prefabs **can not be pre-populated with scene specific data** – Martin Jan 24 '17 at 12:12
-
Are you talking about savegames that store the current progress of the player, or do you mean static game data like map layout, npc stats or stuff like that? – Thomas Hilbert Jan 24 '17 at 13:47
1 Answers
2
Prefebs are meant to use for re-use-ability.I personally use prefebs when I have got a same object on multiple locations. Then I just change 1 parameter and It is applied to all of my game objects. Which saves a lot of my time(instead of changing each gameobject one-by-one).

Ali Sajid
- 257
- 2
- 12