You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add few more type checks to handle new types introduced by ZoneImporter. This will continue to be updated as other importers are added. I think a more general approach should be made for structs and classes so any struct/class field is supported. Structs and classes that don't inherit `EditorObject` will likely be treated as plain data. It might need a concept of ownership too. That would let the system distinguish between referenced objects and fields which must be classes to manage complex data. Though if they're complex enough to be a class maybe they should be required to inherit `EditorObject`. I'll figure it out as I work on the remaining importers. They'll have more complex data to test with.
Compiler.EmitTypeBody(selfType, scope $" //Failed to emit code for {field.FieldType.GetFullName(.. scope .())} {fieldName}");
108
-
Compiler.EmitTypeBody(selfType,"\n");
109
-
//Note: Temporarily disabled while the zone importers and projectDB are being developed
110
-
//Runtime.FatalError(scope $"Unsupported type '{fieldTypeName}' used in editor property {genericTypeName}.{fieldName}. Please implement in Snapshot<T>.GenerateCommit()");
107
+
if(fieldType.HasInterface(typeof(IList)))
108
+
{
109
+
Compiler.EmitTypeBody(selfType, scope $" if (this.{fieldName} != S_Target.{fieldName})\n");
Runtime.FatalError(scope $"Unsupported type '{fieldTypeName}' used in editor property {genericTypeName}.{fieldName}. BaseTypeName = {baseTypeName}. Please implement in Snapshot<T>.GenerateDiffTransactions()");
Compiler.EmitTypeBody(selfType, scope $" //Failed to emit code for {field.FieldType.GetFullName(.. scope .())} {fieldName}");
148
-
Compiler.EmitTypeBody(selfType,"\n");
149
-
//Note: Temporarily disabled while the zone importers and projectDB are being developed
150
-
//Runtime.FatalError(scope $"Unsupported type '{fieldTypeName}' used in editor property {genericTypeName}.{fieldName}. Please implement in Snapshot<T>.GenerateApply()");
Runtime.FatalError(scope $"Unsupported type '{fieldTypeName}' used in editor property {genericTypeName}.{fieldName}. BaseTypeName = {baseTypeName}. Please implement in Snapshot<T>.GenerateApply()");
Runtime.FatalError(scope $"Unsupported type '{typeof(U).GetFullName(.. scope .())}' used in editor property {typeof(T).GetFullName(.. scope .())}.{V}. Please implement in Snapshot<T>.GenerateCommit()");
Compiler.EmitTypeBody(selfType, scope $" //Failed to emit code for {typeof(U).GetFullName(.. scope .())} {V}\n");
101
+
Compiler.EmitTypeBody(selfType,"}\n");
102
+
Runtime.FatalError(scope $"Unsupported type '{typeof(U).GetFullName(.. scope .())}' used in editor property {typeof(T).GetFullName(.. scope .())}.{V}. Please implement in Snapshot<T>.GenerateCommit()");
Runtime.FatalError(scope $"Unsupported type '{typeof(U).GetFullName(.. scope .())}' used in editor property {typeof(T).GetFullName(.. scope .())}.{V}. Please implement in Snapshot<T>.GenerateRevert()");
Compiler.EmitTypeBody(selfType, scope $" //Failed to emit code for {typeof(U).GetFullName(.. scope .())} {V}\n");
134
+
Compiler.EmitTypeBody(selfType,"}\n");
135
+
Runtime.FatalError(scope $"Unsupported type '{typeof(U).GetFullName(.. scope .())}' used in editor property {typeof(T).GetFullName(.. scope .())}.{V}. Please implement in Snapshot<T>.GenerateRevert()");
0 commit comments