private void AutoFixActiveGenerator()
        {
            if (chosenGenerator != null)
            {
                return;
            }

            templateIndex   = Mathf.Clamp(templateIndex, 0, ScriptDescriptor.Descriptors.Count);
            chosenGenerator = ScriptDescriptor.Descriptors[templateIndex].CreateInstance();
        }
        private void DrawTemplateSelector()
        {
            if (templateNames == null)
            {
                templateNames = ScriptDescriptor.Descriptors
                                .Select(descriptor => descriptor.Attribute.TemplateName)
                                .ToArray();
            }

            EditorGUILayout.LabelField("Template");
            EditorGUI.BeginChangeCheck();
            templateIndex = EditorGUILayout.Popup(templateIndex, templateNames);
            if (EditorGUI.EndChangeCheck())
            {
                chosenGenerator = null;
            }
        }