private MetaType[] _GetAllMetaTypes() { var list = new List <MetaType>(); foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { try { foreach (var type in assembly.GetTypes()) { if (EditorMetaCommon.IsMetadata(type)) { var metaType = new MetaType(type); list.Add(metaType); } } } catch (Exception ex) { Console.Error.WriteLine("assembly={0}, ex={1}", assembly.FullName, ex.ToString()); } } list.Sort((x, y) => x.FullName.CompareTo(y.FullName)); var types = list.ToArray(); return(types); }
public ExportFlags GetExportFlags() { if (_exportFlags == ExportFlags.None) { _exportFlags = EditorMetaCommon.GetExportFlags(_rawType); } return(_exportFlags); }
public MetaManager() { _metaTypes = _GetAllMetaTypes(); foreach (var type in _metaTypes) { if (type.IsTemplate) { _templateTypes.Add(type); } else if (type.IsConfig) { _configTypes.Add(type); } } EditorMetaCommon.Init(this); }
public string GetMetaTypeName() { return(EditorMetaCommon.GetMetaTypeName(_rawType)); }