internal static void Postfix(Type baseType, ref Type[] __result)
        {
            List <Type> types = __result.ToList();

            if (TypeExportManager.Types.Contains(baseType))
            {
                types.AddRange(TypeExportManager.GetTypesOfType(baseType));
            }

            __result = types.ToArray();
        }
Esempio n. 2
0
        internal static void AddCustomHotkeys(ref ToolInputCombos __result, char scheme)
        {
            foreach (Type toolType in TypeExportManager.GetTypesOfType(typeof(LevelEditorTool)))
            {
                LevelEditorTool instance = Activator.CreateInstance(toolType) as LevelEditorTool;

                if (toolType.HasAttribute <EditorToolAttribute>() && toolType.GetAttribute(out KeyboardShortcutAttribute attribute, false))
                {
                    __result.Add(attribute.Get(scheme).ToString(), instance.Info_.Name_);
                }
            }
        }
Esempio n. 3
0
 private void RegisterExportedTypes()
 {
     TypeExportManager.Register <ISerializable>();
     TypeExportManager.Register <LevelEditorTool>((type) => type.HasAttribute <EditorToolAttribute>());
     TypeExportManager.Register <AddedComponent>((type) => type.HasAttribute <EditorScriptAttribute>());
 }