Exemplo n.º 1
0
    IEnumerator InitializeUISystemRenderer()
    {
        if (m_IsCoroutineStarted)
        {
            yield break;
        }

        m_IsCoroutineStarted = true;

        // Do not recreate the UI System Renderer
        if (m_UISystemRenderer != null)
        {
            yield break;
        }

        // If the UI System is null we can't do anything
        if (m_UISystem == null)
        {
            yield break;
        }

        CoherentUIGTRenderEvents.SendRenderEvent(CoherentRenderEventType.CreateSystemRenderer, 0);

        while (m_UISystemRenderer == null)
        {
            yield return(null);

            m_UISystemRenderer = m_UISystem.GetRenderer();
        }

        Debug.Log("[Coherent GT] System renderer initialized.");

        if (SystemReadyHandlers != null)
        {
            SystemReadyHandlers();
        }
    }