Example #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();
            }
        }
    }
Example #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();
            }
        }
    }
Example #3
0
 protected abstract void LoadSnapshot(FinishedLoadingEvent e);