Exemple #1
0
        public void _RestoreObject(GameObject gobject, Transform parent)
        {
            Node node = SyncData.nodes[gobject.name];

            node.AddInstance(gobject);

            RestoreFromTrashInfo trashInfo = new RestoreFromTrashInfo
            {
                transform = gobject.transform,
                parent    = parent
            };

            MixerClient.Instance.SendEvent <RestoreFromTrashInfo>(MessageType.RestoreFromTrash, trashInfo);

            LightController lightController = gobject.GetComponent <LightController>();

            if (null != lightController)
            {
                return;
            }
            CameraController cameraController = gobject.GetComponent <CameraController>();

            if (null != cameraController)
            {
                return;
            }

            foreach (Transform child in gobject.transform)
            {
                _RestoreObject(child.GetChild(0).gameObject, gobject.transform);
            }
        }
Exemple #2
0
        public void RestoreFromTrash(RestoreFromTrashInfo restoreFromTrash)
        {
            NetCommand command = MixerUtils.BuildRestoreFromTrashCommand(root, restoreFromTrash);

            AddCommand(command);
        }