private void AttemptResolve() { if (Engine.ScriptingInterface.IsCvarRegistered(Name)) { Cvar cvar = Engine.ScriptingInterface.GetCvar(Name); if (typeof(CvarBase <T>).IsAssignableFrom(cvar.GetType())) { value = (CvarBase <T>)cvar; } } }
public CachedCvar(string name, T defaultValue) { this.Name = name; this.DefaultValue = defaultValue; this.value = null; }