public static void SetModuleString(IIgorModule Module, string StringKey, string Value) { IgorConfig Inst = GetInstance(); if (Inst != null) { string FullKey = StringKey; if (Module != null) { FullKey = Module.GetModuleName() + "." + FullKey; } int CurrentIndex = 0; foreach (IgorConfigKeyValuePair <string, string> CurrentValue in Inst.ModuleStrings) { if (CurrentValue.Key == FullKey) { Inst.ModuleStrings[CurrentIndex].Value = Value; return; } ++CurrentIndex; } IgorConfigKeyValuePair <string, string> NewInst = new IgorConfigKeyValuePair <string, string>(FullKey, Value); Inst.ModuleStrings.Add(NewInst); } }
public static string GetModuleString(IIgorModule Module, string StringKey, string DefaultValue = "") { IgorConfig Inst = GetInstance(); if (Inst != null) { string FullKey = StringKey; if (Module != null) { FullKey = Module.GetModuleName() + "." + FullKey; } foreach (IgorConfigKeyValuePair <string, string> CurrentValue in Inst.ModuleStrings) { if (CurrentValue.Key == FullKey) { return(CurrentValue.Value); } } return(DefaultValue); } return(DefaultValue); }
public static bool GetModuleBool(IIgorModule Module, string BoolKey, bool bDefaultValue = false) { IgorConfig Inst = GetInstance(); if (Inst != null) { string FullKey = BoolKey; if (Module != null) { FullKey = Module.GetModuleName() + "." + FullKey; } foreach (IgorConfigKeyValuePair <string, bool> CurrentValue in Inst.ModuleBools) { if (CurrentValue.Key == FullKey) { return(CurrentValue.Value); } } return(bDefaultValue); } return(bDefaultValue); }
public override bool IsDependentOnModule(IIgorModule ModuleInst) { if (ModuleInst.GetModuleName() == "Configure.SetScriptingDefines") { return(true); } return(false); }
public virtual void LogError(IIgorModule Module, string Message) { if(Module != null) { Debug.LogError("Igor Error: " + Module.GetModuleName() + " : " + Message); } else { LogError(Message); } }
public virtual void LogWarning(IIgorModule Module, string Message) { if(Module != null) { Debug.LogWarning("Igor Warning: " + Module.GetModuleName() + " : " + Message); } else { LogWarning(Message); } }
public virtual void LogError(IIgorModule Module, string Message) { if (Module != null) { Debug.LogError("Igor Error: " + Module.GetModuleName() + " : " + Message); } else { LogError(Message); } }
public virtual void LogWarning(IIgorModule Module, string Message) { if (Module != null) { Debug.LogWarning("Igor Warning: " + Module.GetModuleName() + " : " + Message); } else { LogWarning(Message); } }
public virtual void CriticalError(IIgorModule Module, string Message) { if(Module != null) { Debug.LogError("Igor Error: " + Module.GetModuleName() + " : " + Message); throw new UnityException(Message); } else { LogError(Message); } }
public virtual void CriticalError(IIgorModule Module, string Message) { if (Module != null) { Debug.LogError("Igor Error: " + Module.GetModuleName() + " : " + Message); throw new UnityException(Message); } else { LogError(Message); } }
public static bool RegisterNewModule(IIgorModule NewModule) { if (StaticGetEnabledModuleNames().Contains(NewModule.GetModuleName())) { bool bFound = false; foreach (IIgorModule CurrentModule in EnabledModules) { if (CurrentModule.GetModuleName() == NewModule.GetModuleName()) { bFound = true; } } if (!bFound) { EnabledModules.Add(NewModule); return(true); } } return(false); }
public static void SetModuleActiveForJob(IIgorModule NewModule) { if (EnabledModules.Contains(NewModule) && !ActiveModulesForJob.Contains(NewModule)) { bool bFound = false; foreach (IIgorModule CurrentModule in ActiveModulesForJob) { if (CurrentModule.GetModuleName() == NewModule.GetModuleName()) { bFound = true; } } if (!bFound) { ActiveModulesForJob.Add(NewModule); } } }
public override bool IsDependentOnModule(IIgorModule ModuleInst) { if(ModuleInst.GetModuleName() == "Configure.SetScriptingDefines") { return true; } return false; }
public static void SetModuleActiveForJob(IIgorModule NewModule) { if(EnabledModules.Contains(NewModule) && !ActiveModulesForJob.Contains(NewModule)) { bool bFound = false; foreach(IIgorModule CurrentModule in ActiveModulesForJob) { if(CurrentModule.GetModuleName() == NewModule.GetModuleName()) { bFound = true; } } if(!bFound) { ActiveModulesForJob.Add(NewModule); } } }
public static bool RegisterNewModule(IIgorModule NewModule) { if(StaticGetEnabledModuleNames().Contains(NewModule.GetModuleName())) { bool bFound = false; foreach(IIgorModule CurrentModule in EnabledModules) { if(CurrentModule.GetModuleName() == NewModule.GetModuleName()) { bFound = true; } } if(!bFound) { EnabledModules.Add(NewModule); return true; } } return false; }