public override IRestorableComponent saveComponent(GameObject gameObject, IComponentAssigner assigner, GamePersistence.SaveType saveType) { setSaveData(saveType); AutomatedScriptTransfer.TransferScriptsSaving(this, savedDictionary, saveType); return(CreatedSaveableMonoBehaviour); }
public override IRestorableComponent saveComponent(GameObject gameObject, IComponentAssigner assigner, GamePersistence.SaveType saveType) { saveComponentValues(gameObject, assigner, saveType); AutomatedScriptTransfer.transferComponentSaving (this, CreatedSaveableComponent.DataContainer); return(CreatedSaveableComponent); }
/// <summary> /// loads all static members from saved types /// </summary> private void LoadStaticData() { if (savedStaticData != null) { foreach (KeyValuePair <string, Dictionary <string, object> > classStaticMembers in savedStaticData) { Type t = Type.GetType(classStaticMembers.Key); AutomatedScriptTransfer.RestoreStaticData(classStaticMembers.Value, t); } } }
public void SaveStaticValues() { savedStaticData = new Dictionary <string, Dictionary <string, object> >(); foreach (Type t in StaticGameData) { Dictionary <string, object> dict = new Dictionary <string, object>(); AutomatedScriptTransfer.TransferStaticScriptsSaving(t, dict, GamePersistence.SaveType.Game); string type = t.AssemblyQualifiedName; savedStaticData[type] = dict; } }
public ISaveableComponent restoreComponent(IComponentAssigner assigner) { AutomatedScriptTransfer.restoreData(values, createdComponent, LastSerializedType); componentRestored(createdComponent, assigner); return(createdComponent); }