public static void Open <WindowType> (Vector2 windowPosition, AssetCreationWindowArgs windowArgs, Action <WindowType> assetCreated) where WindowType : AssetCreationWindow { CloseAllOpenWindows(); AssetCreationWindow window = CreateInstance <WindowType> (); OverwriteWindowFromStoredJson(window); window.position = new Rect(windowPosition, new Vector2(270, 200)); window.ShowPopup(); window.Focus(); window.AssetCreated += creationWindow => assetCreated.Invoke((WindowType)creationWindow); window.Initialize(windowArgs); }
protected virtual void Initialize(AssetCreationWindowArgs windowArgs) { initialized = true; Initializing(windowArgs); originalWindowRect = position; LoadCreationInfoObject(); int nextHighestId = GetCurrentHighestID() + 1; if (creationMode == AssetCreationMode.Single) { singleCreationInfo[0].ID = nextHighestId; } }
protected virtual void Initializing(AssetCreationWindowArgs windowArgs) { }