Unity3D2Babylon.ExporterWindow.CreateEditorController_CS C# (CSharp) Метод

CreateEditorController_CS() приватный Метод

private CreateEditorController_CS ( ) : void
Результат void
        public static void CreateEditorController_CS()
        {
            string path = AssetDatabase.GetAssetPath(Selection.activeObject);
            if (String.IsNullOrEmpty(path))
            {
                path = "Assets";
            }
            else if (!String.IsNullOrEmpty(Path.GetExtension(path)))
            {
                path = path.Replace(Path.GetFileName(AssetDatabase.GetAssetPath(Selection.activeObject)), "");
            }
            string filename = Path.Combine(path, "NewSceneController.cs");
            string template = "Assets/Babylon/Templates/Scripts/editora.template";
            if (!File.Exists(template))
            {
                string defaultTemplate = "// Babylon Controller Class";
                File.WriteAllText(template, defaultTemplate);
            }
            var icon = EditorGUIUtility.FindTexture("ScriptableObject Icon") as Texture2D;
            var DoCreateScriptAsset = Type.GetType("UnityEditor.ProjectWindowCallback.DoCreateScriptAsset, UnityEditor");
            ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(DoCreateScriptAsset) as UnityEditor.ProjectWindowCallback.EndNameEditAction, filename, icon, template);
        }