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); } }
public void RestoreFromTrash(RestoreFromTrashInfo restoreFromTrash) { NetCommand command = MixerUtils.BuildRestoreFromTrashCommand(root, restoreFromTrash); AddCommand(command); }