public static void CreateWidget() { var info = GetClassInfo(); var path = GetPath(); var gen = new ScriptsGenerator(info, path); gen.Generate(); }
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(); }