private void ApplyAutoImporters() { foreach (var type in AutoCustomTmxImporterAttribute.GetOrderedAutoImportersTypes()) { RunCustomImporterType(type); } }
private void ShowCustomImporterGui() { // Show the user-selected custom importer EditorGUILayout.LabelField("Custom Importer Settings", EditorStyles.boldLabel); var selected = EditorGUILayout.Popup("Custom Importer", m_SelectedCustomImporter, m_CustomImporterNames); if (selected != m_SelectedCustomImporter) { m_SelectedCustomImporter = selected; m_CustomImporterClassName.stringValue = m_CustomImporterTypes.ElementAtOrDefault(selected); } EditorGUILayout.HelpBox("Custom Importers are an advanced feature that require scripting. Create a class inherited from CustomTmxImporter and select it from the list above.", MessageType.None); // List all the automatically applied custom importers using (new GuiScopedIndent()) { var importers = AutoCustomTmxImporterAttribute.GetOrderedAutoImportersTypes(); var title = string.Format("Auto Importers ({0})", importers.Count()); var tip = "This custom importers will be automatically applied to your import process."; var content = new GUIContent(title, tip); m_ShowAutoImporters = EditorGUILayout.Foldout(m_ShowAutoImporters, content); if (m_ShowAutoImporters) { foreach (var t in importers) { EditorGUILayout.LabelField(t.GetDisplayName()); } EditorGUILayout.HelpBox("Auto Importers are custom importers that run on automatically on every exported Tiled map. Order is controlled by the AutoCustomImporterAttribute.", MessageType.None); } } }