private void _RemoveObject(GameObject gobject) { SendToTrashInfo trashInfo = new SendToTrashInfo { transform = gobject.transform }; MixerClient.Instance.SendEvent <SendToTrashInfo>(MessageType.SendToTrash, trashInfo); Node node = SyncData.nodes[gobject.name]; node.RemoveInstance(gobject); LightController lightController = gobject.GetComponent <LightController>(); if (null != lightController) { return; } CameraController cameraController = gobject.GetComponent <CameraController>(); if (null != cameraController) { return; } foreach (Transform child in gobject.transform) { _RemoveObject(child.GetChild(0).gameObject); } }
public void SendToTrash(SendToTrashInfo sendToTrash) { NetCommand command = MixerUtils.BuildSendToTrashCommand(root, sendToTrash); AddCommand(command); }