private IEnumerator InitializeCoroutine() { yield return(new WaitWhile(() => GetComponent <XsollaBrowser>() == null)); IXsollaBrowser xsollaBrowser = GetComponent <XsollaBrowser>(); yield return(new WaitWhile(() => xsollaBrowser.Render == null)); render = xsollaBrowser.Render; }
IEnumerator InitializationCoroutine(IXsollaBrowser browser) { yield return(new WaitForEndOfFrame()); yield return(StartCoroutine(WaitPreloaderCoroutine())); display.StartRedrawWith((int)Viewport.x, (int)Viewport.y); display.RedrawFrameCompleteEvent += EnableCloseButton; display.ViewportChangedEvent += (width, height) => Viewport = new Vector2(width, height); InitializeInput(); BrowserInitEvent?.Invoke(browser); }