Reload scripts in Play Mode!!!

- Dont serialize static fields
- Added some profiling to ScriptEngine
- Removed superseded ScriptFieldMaps
This commit is contained in:
Simon Lübeß
2023-12-24 01:33:48 +01:00
parent d0f0a34247
commit abb119589c
7 changed files with 58 additions and 169 deletions
+6 -1
View File
@@ -453,7 +453,8 @@ public static class EntitySerializer
}
else if (fieldType.IsClass)
{
// SerializeClass(fieldName, fieldValue, fieldType);
//DeserializeClass(fieldName, fieldValue, fieldType);
Log.Error("Class is not yet implemented.");
}
else
{
@@ -565,6 +566,10 @@ public static class EntitySerializer
public static bool SerializeField(FieldInfo fieldInfo)
{
// TODO: We want to be able to serialize static fields in the future!
if (fieldInfo.IsStatic)
return false;
var serializeField = fieldInfo.HasCustomAttribute<SerializeFieldAttribute>();
var dontSerializeField = fieldInfo.HasCustomAttribute<DontSerializeFieldAttribute>();
//var hideField = fieldInfo.HasCustomAttribute<HideInEditorAttribute>();