Beispiel #1
0
    void OnApplicationQuit()
    {
        if (UISystemDestroying != null)
        {
            UISystemDestroying();
        }

        OnDestroy();

        foreach (Texture textureAsset in m_PreloadedImageTextureAssetsInUse.Values)
        {
            Resources.UnloadAsset(textureAsset);
        }
        m_PreloadedImageTextureAssetsInUse.Clear();

        foreach (RenderTexture renderTexture in m_LiveViewRenderTexturesForLateRelease.Values)
        {
            renderTexture.Release();
        }
        m_LiveViewRenderTexturesForLateRelease.Clear();

        if (m_UISystem != null)
        {
            CoherentUIGT_Native.UnityOnApplicationQuit();
            m_UISystem.Dispose();
            m_UISystem = null;

            if (m_LocalizationManager != null)
            {
                m_LocalizationManager.Dispose();
                m_LocalizationManager = null;
            }
        }
    }
Beispiel #2
0
    void Awake()
    {
        useGUILayout = false;

        CoherentUIGTLibrary.SetDependenciesPath();

                #if UNITY_EDITOR
        m_InspectorResourcesFolder = "./Assets/WebPlayerTemplates";
                #else
        m_InspectorResourcesFolder = Application.dataPath;
                #endif

        m_MouseEventData = new CoherentUIGTMouseEventData();
        m_KeyEventData   = new CoherentUIGTKeyEventData();

        if (m_LocalizationEnabled)
        {
            m_LocalizationManager = new CoherentUIGTLocalizationManager();
        }

        CoherentUIGTLibrary.RestoreProcessPath();
    }