Merge pull request #132 from liesauer/master

Fix standalone reading config item type casting bug
This commit is contained in:
Sinai 2022-04-01 01:21:39 +11:00 committed by GitHub
commit 8837119781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,11 @@ namespace UnityExplorer.Loader.Standalone
return bool.Parse(value); return bool.Parse(value);
else if (elementType == typeof(int)) else if (elementType == typeof(int))
return int.Parse(value); return int.Parse(value);
else else if (elementType == typeof(float))
return float.Parse(value);
else if (elementType.IsEnum)
return Enum.Parse(elementType, value);
else
return value; return value;
} }