Пример #1
0
 private void GetSelectedTemplates()
 {
     newTemplates = (from template in Selection.GetFiltered <TextAsset>(SelectionMode.Assets)
                     where EZScriptTemplateProcessor.CheckTemplate(template.name + ".txt", ezScriptTemplate) == EZScriptTemplateProcessor.CheckResult.Template
                     select template).ToArray();
     Repaint();
 }
 protected void DrawHandlePatternButton()
 {
     if (GUILayout.Button("Handle patterns in selected file"))
     {
         string filePath = AssetDatabase.GetAssetPath(Selection.activeObject);
         EZScriptTemplateProcessor.Replace(filePath, ezScriptTemplate);
     }
 }
Пример #3
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, ezScriptTemplate);
            }
            EditorGUILayout.PropertyField(m_TimeFormat);
            patternFoldout = EditorGUILayout.Foldout(patternFoldout, "Patterns");
            if (patternFoldout)
            {
                DrawConstPatternList();
                DrawCustomPatternList();
            }
            DrawExtensionList();
        }