void RefreshContainerForShape(BaseDisposable updatedComponent) { UIShape childComponent = updatedComponent as UIShape; Assert.IsTrue(childComponent != null, "This should never happen!!!!"); if (((UIShape.Model)childComponent.GetModel()).parentComponent != id) { RefreshAll(); return; } GameObject stackContainer = null; if (!stackContainers.ContainsKey(childComponent.id)) { stackContainer = Object.Instantiate(Resources.Load("UIContainerStackChild")) as GameObject; #if UNITY_EDITOR stackContainer.name = "UIContainerStackChild - " + childComponent.id; #endif stackContainers.Add(childComponent.id, stackContainer); int oldSiblingIndex = childComponent.referencesContainer.transform.GetSiblingIndex(); childComponent.referencesContainer.transform.SetParent(stackContainer.transform, false); stackContainer.transform.SetParent(referencesContainer.childHookRectTransform, false); stackContainer.transform.SetSiblingIndex(oldSiblingIndex); } else { stackContainer = stackContainers[childComponent.id]; } RefreshAll(); }
bool MaterialInfo.IsVisible() { if (!((UIShape.Model)shape.GetModel()).visible) { return(false); } return(IsParentVisible(shape)); }
public void OnPointerDown(PointerEventData eventData) { UIShape.Model ownerModel = (UIShape.Model)owner.GetModel(); if (VERBOSE) { Debug.Log("pointer current raycast: " + eventData.pointerCurrentRaycast, eventData.pointerCurrentRaycast.gameObject); Debug.Log("pointer press raycast: " + eventData.pointerPressRaycast, eventData.pointerPressRaycast.gameObject); } if (!string.IsNullOrEmpty(ownerModel.onClick) && eventData.pointerPressRaycast.gameObject == childHookRectTransform.gameObject) { WebInterface.ReportOnClickEvent(owner.scene.sceneData.id, ownerModel.onClick); } }