Beispiel #1
0
    private void OnDestroy()
    {
        foreach (var widget in widgets)
        {
            UIWidgetController.Hide(widget);
        }

        GameObjectManager manager = GameObjectManager.GetInstance();

        if (preLoad != null)
        {
            foreach (var item in preLoad)
            {
                manager.ClearObject(item.name);
            }
        }

        Resources.UnloadUnusedAssets();
    }