- Basic Config & Settings working (read-only, changes must be made via debug halt).
This commit is contained in:
@@ -36,18 +36,11 @@ public class SettingEntry<T> : SettingBase, ISettingBase<T>, INetworkSyncEntity
|
||||
try
|
||||
{
|
||||
Value = (T)Convert.ChangeType(ConfigInfo.Element.GetAttributeString("Value", null), typeof(T));
|
||||
DefaultValue = Value;
|
||||
}
|
||||
catch (Exception e) when (e is InvalidCastException or ArgumentNullException)
|
||||
{
|
||||
Value = default(T);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DefaultValue = (T)Convert.ChangeType(ConfigInfo.Element.GetAttributeString("Value", null), typeof(T));
|
||||
}
|
||||
catch (Exception e) when (e is InvalidCastException or ArgumentNullException)
|
||||
{
|
||||
DefaultValue = default(T);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user