bool IsValidField(TraitPropertyDefinition field) { if (field.Type == m_ExpectedType) { return(true); } return(m_ExpectedType == typeof(Enum) && field.Type.FullName.StartsWith(Unity.Semantic.Traits.Utility.TypeResolver.EnumsQualifier)); }
static string GetRuntimePropertyType(TraitPropertyDefinition property) { if (property.Type == typeof(GameObject) || property.Type == typeof(Entity)) { return(TypeResolver.GetUnmangledName(typeof(TraitBasedObjectId))); } var descriptor = Semantic.Traits.CodeGen.CodeGenerator.GetTraitDescriptorData(property); return(descriptor?.RuntimeType); }