static void CreateOSA(MenuCommand menuCommand) { if (!CheckForCreateOSAViaWizard()) { return; } CreateOSAWindow.Open(new CreateOSAWindow.Parameters()); }
static bool CheckForCreateOSAViaWizard() { string reasonIfNotValid; // Manually checking for validation, as this provides richer info about the case when creation is not possible if (!CreateOSAWindow.Validate(true, out reasonIfNotValid)) { CWiz.ShowCouldNotExecuteCommandNotification(null); Debug.Log("OSA: Could not create ScrollView on the selected object: " + reasonIfNotValid); return(false); } return(true); }
static void CreateOSA(MenuCommand menuCommand) { string reasonIfNotValid; // Manually checking for validation, as this provides richer info about the case when creation is not possible if (!CreateOSAWindow.Validate(true, out reasonIfNotValid)) { CWiz.ShowCouldNotExecuteCommandNotification(null); Debug.Log("OSA: Could not create ScrollView on the selected object: " + reasonIfNotValid); return; } CreateOSAWindow.Open(new CreateOSAWindow.Parameters()); }
public static void Open(Parameters windowParams) { CreateOSAWindow windowInstance = GetWindow <CreateOSAWindow>(); windowInstance.InitWithNewParams(windowParams); }