private void ModelListItem_OnSpoutClick(ModelListItem listItem) { var modelItem = listItem.objModel.GetComponent <ModelItem>(); if (modelItem != null) { tmpModelListItem = listItem; spoutSelector.SetElements(GetSpoutList()); btnSpoutModal.onClick.Invoke(); } }
private void ModelListItem_OnSpoutSyphonClick(ModelListItem listItem) { var modelItem = listItem.objModel.GetComponent <ModelItem>(); if (modelItem != null) { tmpModelListItem = listItem; #if UNITY_STANDALONE_OSX if (syphonSelector.selectedElement.Length == 0) { syphonSelector.selectedElement = syphonSelector.elements[0]; syphonSelector.defaultIndex = 0; } else { for (int i = 0; i < syphonSelector.elements.Count; i++) { if (syphonSelector.selectedElement == syphonSelector.elements[i]) { syphonSelector.defaultIndex = i; } } } syphonSelector.SetElements(GetSpoutSyphonList()); btnSyphonModal.onClick.Invoke(); #endif #if UNITY_STANDALONE_WIN //spoutSelector.SetElements(GetSpoutSyphonList()); if (spoutSelector.selectedElement.Length == 0) { spoutSelector.selectedElement = spoutSelector.elements[0]; spoutSelector.defaultIndex = 0; } else { for (int i = 0; i < spoutSelector.elements.Count; i++) { if (spoutSelector.selectedElement == spoutSelector.elements[i]) { spoutSelector.defaultIndex = i; } } } spoutSelector.SetElements(GetSpoutSyphonList()); btnSpoutModal.onClick.Invoke(); #endif } }