Beispiel #1
0
        public override void Save(WorldSaveData worldSaveData)
        {
            base.Save(worldSaveData);
            GameObjectSaveData saveData = new GameObjectSaveData(posterInitData, transformData);

            worldSaveData.savedGameObjects.Add(saveData);
        }
Beispiel #2
0
        // Spawns and initializes an object given initdata and serialized transform (for saved unique ID)
        GameObject SpawnFromSaveData(GameObjectSaveData saveData)
        {
            GameObject prototype = CreatePrototype(saveData.initData.PrefabPath);
            GameObject instance  = SpawnInstance(prototype, saveData.initData, saveData.transformData.myUniqueID);

            return(instance);
        }