private IGTextureGenerator GetActiveGenerator()
        {
            GTextureGenerationMode mode = GTextureToolParams.Instance.General.Mode;
            string className            = "G" + mode.ToString() + "Generator";
            Type   type = GCommon.GetAllLoadedTypes().Find(t => t.Name.Equals(className));

            if (type != null && type.GetInterface(typeof(IGTextureGenerator).Name) != null)
            {
                return(Activator.CreateInstance(type) as IGTextureGenerator);
            }

            return(null);
        }
        private void DrawSpecificParamsGUI()
        {
            string id    = "texture-editor-specific";
            string label = "Specific Parameters";

            GEditorCommon.Foldout(label, true, id, () =>
            {
                GTextureGenerationMode mode = GTextureToolParams.Instance.General.Mode;
                string methodName           = "Draw" + mode.ToString() + "Params";
                MethodInfo guiMethod        = typeof(GTextureEditorWindow).GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
                if (guiMethod != null)
                {
                    guiMethod.Invoke(this, null);
                }
            });
        }