public void SetParentUIE(IUIElement newParentUIE, bool worldPositionStays) { IUIAdaptor newParentUIA = newParentUIE.GetUIAdaptor(); Transform parentTransform = newParentUIA.GetTransform(); this.transform.SetParent(parentTransform, worldPositionStays); newParentUIA.UpdateUIAdaptorHiearchy(true); }
/* Setting up UIA Hierarchy */ public void UpdateUIAdaptorHiearchy(bool recursively) { UpdateUIAdaptorHiearchyImple(); if (recursively) { foreach (IUIAdaptor childUIAdaptor in thisChildUIAdaptors) { childUIAdaptor.UpdateUIAdaptorHiearchy(true); } } else { IUIAdaptor parentUIA = thisParentUIAdaptor; if (parentUIA != null) { parentUIA.UpdateUIAdaptorHiearchy(false); } } }