Ejemplo n.º 1
0
        public static void CreateWidget()
        {
            var info = GetClassInfo();

            var path = GetPath();
            var gen  = new ScriptsGenerator(info, path);

            gen.Generate();
        }
Ejemplo n.º 2
0
        public static void CreateWidget()
        {
            var info = GetClassInfo();

            if (info.IsUnityObject && !EditorUtility.DisplayDialog(
                    "Widgets Generation",
                    "Class is derived from Unity.Object.\nUsing it as a data class can be a bad practice and lead to future problems.",
                    "Continue generation",
                    "Cancel"))
            {
                return;
            }

            var path = GetPath();
            var gen  = new ScriptsGenerator(info, path);

            gen.Generate();
        }