Exemple #1
0
 private void GetSelectedTemplates()
 {
     newTemplates = (from template in Selection.GetFiltered <TextAsset>(SelectionMode.Assets)
                     where EZScriptTemplateProcessor.CheckTemplate(template.name + ".txt") == EZScriptTemplateProcessor.CheckResult.Template
                     select template).ToArray();
     Repaint();
 }
Exemple #2
0
        protected void DrawPatternList()
        {
            EditorGUILayout.LabelField("Pattern", EditorStyles.boldLabel);

            if (GUILayout.Button("Handle patterns in selected file"))
            {
                string filePath = AssetDatabase.GetAssetPath(Selection.activeObject);
                EZScriptTemplateProcessor.Replace(filePath);
            }
            EditorGUILayout.PropertyField(m_TimeFormat);
            patternFoldout = EditorGUILayout.Foldout(patternFoldout, "Patterns");
            if (patternFoldout)
            {
                DrawConstPatternList();
                DrawCustomPatternList();
            }
            DrawExtensionList();
        }