private void OnSelect() { SelectObjectDialog objectSelector = null; Transform dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow(RuntimeWindowType.SelectObject.ToString(), "Select " + MemberInfoType.Name, (sender, args) => { if (objectSelector.IsNoneSelected) { SetValue(null); EndEdit(); SetInputField(null); } else { SetValue(objectSelector.SelectedObject); EndEdit(); SetInputField(objectSelector.SelectedObject); } }); objectSelector = dialogTransform.GetComponentInChildren <SelectObjectDialog>(); objectSelector.ObjectType = MemberInfoType; }
private void OnSelect() { m_objectSelector = Instantiate(ObjectSelectorPrefab); m_objectSelector.transform.position = Vector3.zero; m_objectSelector.ObjectType = MemberInfoType; PopupWindow.Show("Select " + MemberInfoType.Name, m_objectSelector.transform, "Select", args => { if (m_objectSelector.IsNoneSelected) { SetValue(null); EndEdit(); SetInputField(null); } else { SetValue(m_objectSelector.SelectedObject); EndEdit(); SetInputField(m_objectSelector.SelectedObject); } }, "Cancel"); }