internal void CreateNewTemplatesFiles()
        {
            if (IsInputValid())
            {
                m_Root.SetEnabled(false);

                if (!Directory.Exists(m_Folder))
                {
                    Directory.CreateDirectory(m_Folder);
                }

                StyleSheet      styleSheet      = null;
                VisualTreeAsset visualTreeAsset = null;

                if (m_IsUssEnable)
                {
                    File.WriteAllText(ussPath, GetUssTemplateContent());
                    AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);

                    styleSheet = AssetDatabase.LoadAssetAtPath <StyleSheet>(ussPath);
                }

                if (m_IsUxmlEnable)
                {
                    var stringBuilder = new StringBuilder();

                    if (m_IsUssEnable)
                    {
                        var assetUri   = URIHelpers.MakeAssetUri(styleSheet);
                        var encodedUri = URIHelpers.EncodeUri(assetUri);
                        stringBuilder.AppendLine(string.Format(@"<Style src=""{0}"" />", encodedUri));
                        stringBuilder.Append('\t');
                    }

                    stringBuilder.AppendLine(@"<engine:Label text=""Hello World! From UXML"" />");

                    if (m_IsUssEnable)
                    {
                        stringBuilder.Append('\t');
                        stringBuilder.AppendLine(@"<engine:Label class=""custom-label"" text=""Hello World! With Style"" />");
                    }

                    File.WriteAllText(uxmlPath, UIElementsTemplate.CreateUXMLTemplate(m_Folder, stringBuilder.ToString()));
                    AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
                    visualTreeAsset = AssetDatabase.LoadAssetAtPath <VisualTreeAsset>(uxmlPath);
                }

                File.WriteAllText(cSharpPath, UIElementsTemplate.CreateCSharpTemplate(m_CSharpName, m_IsUxmlEnable, m_IsUssEnable && !m_IsUxmlEnable));
                AssetDatabase.Refresh();
            }
            else
            {
                ShowErrorMessage();
            }
        }
        static void AppendElementAttribute(string name, string value, StringBuilder stringBuilder)
        {
            if (string.IsNullOrEmpty(value))
            {
                return;
            }

            if (name == "picking-mode" && value == "Position")
            {
                return;
            }

            // Clean up value and make it ready for XML.
            value = URIHelpers.EncodeUri(value);

            stringBuilder.Append(" ");
            stringBuilder.Append(name);
            stringBuilder.Append("=\"");
            stringBuilder.Append(value);
            stringBuilder.Append("\"");
        }