private static bool IsUserType(UnityFieldDefinition fieldDefinition) { if (fieldDefinition.IsList || fieldDefinition.IsMap || fieldDefinition.IsOption) { return(false); } return(!fieldDefinition.RawFieldDefinition.singularType.IsBuiltInType); }
private static bool IsBuiltInBlittableType(UnityFieldDefinition fieldDefinition) { if (fieldDefinition.IsList || fieldDefinition.IsMap || fieldDefinition.IsOption) { return(false); } return(!nonBlittableSchemaBuiltInTypes.Contains(fieldDefinition.RawFieldDefinition.singularType .builtInType)); }
private static bool CanBlitFieldOfComponent(UnityFieldDefinition fieldDefinition, Dictionary <string, bool> blittableTypeMap) { if (!IsUserType(fieldDefinition)) { return(IsBuiltInBlittableType(fieldDefinition)); } return(blittableTypeMap[fieldDefinition.RawFieldDefinition.singularType.userType]); }
private static bool CanBlitFieldOfTypeRecursively(UnityFieldDefinition fieldDefinition, Dictionary <string, bool> blittableTypeMap, Dictionary <string, UnityTypeDefinition> unvisited) { if (!IsUserType(fieldDefinition)) { return(IsBuiltInBlittableType(fieldDefinition)); } var fieldTypeString = fieldDefinition.RawFieldDefinition.singularType.userType; if (!blittableTypeMap.ContainsKey(fieldTypeString)) { return(ApplyBlittableMarkerToTypeRecursively(unvisited[fieldTypeString], blittableTypeMap, unvisited)); } return(blittableTypeMap[fieldTypeString]); }