// ====================================================================== // Utilities // ---------------------------------------------------------------------- static Rect GetRectWithMargins(Rect[] rs) { // Determine child area Rect r = Math3D.Union(rs); // Add margins if (Math3D.IsNotZero(Math3D.Area(r))) { r = AddMargins(r); } return(r); }
// ================================================================================= // OnGUI // --------------------------------------------------------------------------------- public void OnGUI() { // Stop all processing if not registered & trial period is over if (EditionController.IsCommunityLimitReached) { string message = null; var area = Math3D.Area(position); if (area > 200000) { message = "iCanScript Community Edition limit reached !\n\nUse the Pro Edition of iCanScript for large projects.\n\nPurchase the Pro Edition from the Unity Assets Store."; } else if (area > 150000) { message = "iCanScript Community Edition limit reached !\n\nPurchase the Pro Edition from the Unity Assets Store."; } else { message = "iCanScript Community Edition limit reached !\n\nPlease purchase the Pro Edition."; } ShowNotification(new GUIContent(message)); return; } }