Пример #1
0
    protected override void LoadSnapshot(FinishedLoadingEvent e)
    {
        var all = FindObjectsOfType <GameObject>();

        for (int i = 0; i < all.Length; i++)
        {
            var go = all[i];
            if (!snapshot.Contains(go.GetId()))
            {
                go.Destroy();
            }
        }
    }
Пример #2
0
    protected override void LoadSnapshot(FinishedLoadingEvent e)
    {
        var all = gameObject.GetAllComponents();

        for (int i = 0; i < all.Length; i++)
        {
            var comp = all[i];
            if (!snapshot.Contains(comp.GetType().Name))
            {
                comp.Destroy();
            }
        }
    }
Пример #3
0
 protected abstract void LoadSnapshot(FinishedLoadingEvent e);