static void ShowAboutWindow() { AboutWindow w = EditorWindow.GetWindowWithRect <AboutWindow>(new Rect(100, 100, 570, 340), true, "About Unity"); w.position = new Rect(100, 100, 570, 340); w.m_Parent.window.m_DontSaveToLayout = true; }
public static EditorWindow GetWindowWithRect(Type t, Rect rect) { string title = null; bool utility = false; return(EditorWindow.GetWindowWithRect(t, rect, utility, title)); }
public static void DeleteGUI() { View view = WindowLayout.FindMainView(); Rect screenPosition = view.screenPosition; DeleteWindowLayout windowWithRect = EditorWindow.GetWindowWithRect <DeleteWindowLayout>(new Rect(screenPosition.xMax - 180f, screenPosition.y + 20f, 200f, 150f), true, "Delete Window Layout"); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; }
private static void ShowAboutWindow() { AboutWindow windowWithRect = EditorWindow.GetWindowWithRect <AboutWindow>(new Rect(100f, 100f, 570f, 340f), true, "About Unity"); windowWithRect.position = new Rect(100f, 100f, 570f, 340f); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; AboutWindowNames.ParseCredits(); }
public static void Show(Rect buttonScreenRect) { Rect rect = new Rect(buttonScreenRect.x, buttonScreenRect.yMax, 300, 50); ProfilerIPWindow w = EditorWindow.GetWindowWithRect <ProfilerIPWindow>(rect, true, "Enter Player IP"); w.position = rect; w.m_Parent.window.m_DontSaveToLayout = true; }
public static void DeleteGUI() { View mainView = FindMainView(); Rect rect = mainView.screenPosition; DeleteWindowLayout w = EditorWindow.GetWindowWithRect <DeleteWindowLayout>(new Rect(rect.xMax - 180, rect.y + 20, 200, 150), true, "Delete Window Layout"); w.m_Parent.window.m_DontSaveToLayout = true; }
static void ShowAttachAnimationWindow(Object[] animationClips) { string title = "Select An Animator Controller"; Vector2 position = new Vector2((Screen.width) / 2, (Screen.height) / 2); Vector2 size = new Vector2(300f, 80f); AttachAnimationClipWindow window = EditorWindow.GetWindowWithRect <AttachAnimationClipWindow>(new Rect(position, size), true, title, true); window.animationClips = animationClips; window.Focus(); }
/** Show the login window */ static public void ShowAssetStoreLoginWindow(string loginReason, LoginCallback callback) { AssetStoreLoginWindow w = EditorWindow.GetWindowWithRect <AssetStoreLoginWindow>(new Rect(100, 100, 360, 140), true, "Login to Asset Store"); w.position = new Rect(100, 100, w.position.width, w.position.height); w.m_Parent.window.m_DontSaveToLayout = true; w.m_Password = ""; w.m_LoginCallback = callback; w.m_LoginReason = loginReason; w.m_LoginRemoteMessage = null; }
static void ShowRenameWindow(Object animation) { string title = "Enter New Animation Name"; Vector2 position = new Vector2((Screen.width) / 2, (Screen.height) / 2); Vector2 size = new Vector2(250f, 80f); RenameEmbeddedAnimationClipWindow window = EditorWindow.GetWindowWithRect <RenameEmbeddedAnimationClipWindow>(new Rect(position, size), true, title, true); window.animation = animation; window.animationName = animation.name; window.Focus(); }
public static void ShowAssetStoreLoginWindow(string loginReason, AssetStoreLoginWindow.LoginCallback callback) { AssetStoreLoginWindow windowWithRect = EditorWindow.GetWindowWithRect <AssetStoreLoginWindow>(new Rect(100f, 100f, 360f, 140f), true, "Login to Asset Store"); windowWithRect.position = new Rect(100f, 100f, windowWithRect.position.width, windowWithRect.position.height); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; windowWithRect.m_Password = string.Empty; windowWithRect.m_LoginCallback = callback; windowWithRect.m_LoginReason = loginReason; windowWithRect.m_LoginRemoteMessage = (string)null; Analytics.Track("/AssetStore/Login"); }
public static AssetStoreInstaBuyWindow ShowAssetStoreInstaBuyWindow(AssetStoreAsset asset, string purchaseMessage, string paymentMethodCard, string paymentMethodExpire, string priceText) { AssetStoreInstaBuyWindow windowWithRect = EditorWindow.GetWindowWithRect <AssetStoreInstaBuyWindow>(new Rect(100f, 100f, 400f, 160f), true, "Buy package from Asset Store"); if (windowWithRect.m_Purchasing != AssetStoreInstaBuyWindow.PurchaseStatus.Init) { EditorUtility.DisplayDialog("Download in progress", "There is already a package download in progress. You can only have one download running at a time", "Close"); return(windowWithRect); } windowWithRect.position = new Rect(100f, 100f, 400f, 160f); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; windowWithRect.m_Asset = asset; windowWithRect.m_Password = string.Empty; windowWithRect.m_Message = string.Empty; windowWithRect.m_Purchasing = AssetStoreInstaBuyWindow.PurchaseStatus.Init; windowWithRect.m_NextAllowedBuildRequestTime = 0.0; windowWithRect.m_BuildAttempts = 0; windowWithRect.m_PurchaseMessage = purchaseMessage; windowWithRect.m_PaymentMethodCard = paymentMethodCard; windowWithRect.m_PaymentMethodExpire = paymentMethodExpire; windowWithRect.m_PriceText = priceText; Analytics.Track(string.Format("/AssetStore/ShowInstaBuy/{0}/{1}", windowWithRect.m_Asset.packageID, windowWithRect.m_Asset.id)); return(windowWithRect); }
public static T GetWindowWithRect <T>(Rect rect) where T : EditorWindow { return(EditorWindow.GetWindowWithRect <T>(rect, false, null, true)); }
private static void ShowSnapSettings() { EditorWindow.GetWindowWithRect <SnapSettings>(new Rect(100f, 100f, 230f, 130f), true, "Snap settings"); }
public static EditorWindow GetWindowWithRect(System.Type t, Rect rect, bool utility) { string title = (string)null; return(EditorWindow.GetWindowWithRect(t, rect, utility, title)); }
private static void ShowPreferencesWindow() { EditorWindow windowWithRect = EditorWindow.GetWindowWithRect <PreferencesWindow>(new Rect(100f, 100f, 500f, 400f), true, "Unity Preferences"); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; }
private static EditorUpdateWindow ShowWindow() { return(EditorWindow.GetWindowWithRect(typeof(EditorUpdateWindow), new Rect(100f, 100f, 570f, 400f), true, EditorUpdateWindow.s_Title.text) as EditorUpdateWindow); }
public static T GetWindowWithRect <T>(Rect rect, bool utility) where T : EditorWindow { return(EditorWindow.GetWindowWithRect <T>(rect, utility, null, true)); }
static void ShowSnapSettings() { EditorWindow.GetWindowWithRect <SnapSettings>(new Rect(100, 100, 230, 140), true, "Snap settings"); }
public static T GetWindowWithRect <T>(Rect rect, bool utility, string title) where T : EditorWindow { return(EditorWindow.GetWindowWithRect <T>(rect, utility, title, true)); }
public static void DeleteGUI() { Rect screenPosition = FindMainWindow().screenPosition; EditorWindow.GetWindowWithRect <DeleteWindowLayout>(new Rect(screenPosition.xMax - 180f, screenPosition.y + 20f, 200f, 150f), true, "Delete Window Layout").m_Parent.window.m_DontSaveToLayout = true; }
private static void ShowWindow() { EditorWindow.GetWindowWithRect(typeof(EditorUpdateWindow), new Rect(100f, 100f, 570f, 400f), true, EditorUpdateWindow.s_Title.text); }
public static void SaveGUI() { Rect screenPosition = FindMainView().screenPosition; EditorWindow.GetWindowWithRect<UnityEditor.SaveWindowLayout>(new Rect(screenPosition.xMax - 180f, screenPosition.y + 20f, 200f, 48f), true, "Save Window Layout").m_Parent.window.m_DontSaveToLayout = true; }