Example #1
0
        private static void createCSharpMonoBehaviour()
        {
            Debug.Log("Create C# MonoBehaviour");

            TemplateFile template = SharpFactory.findTemplate(TemplateType.MonoBehaviour);

            if (template == null)
            {
                return;
            }

            CreateSharpFileAction endNameEditAction = ScriptableObject.CreateInstance <CreateSharpFileAction>();

            endNameEditAction.scriptIcon = EditorIcons.CSharpBehaviourIcon;

            ProjectWindowUtil.StartNameEditingIfProjectWindowExists(
                0,
                endNameEditAction,
                "NewMonoBehaviour.cs",
                EditorIcons.CSharpBehaviourIcon,
                template.getTemplatePath()
                );
        }