public UIAttach_ToWorldObjectAttachPoint( RectTransform inUITransform, WorldObjectAttachPoint inAttachPoint, bool inDestroyUIWithObject) { UITransform = inUITransform; attachPoint = inAttachPoint; destroyUIWithObject = inDestroyUIWithObject; }
//Methods //-API public void attach( GameObject inUI, WorldObjectAttachPoint inAttachPoint, bool inDestroyUIWithObject = true) { XUtils.getComponent <RectTransform>( inUI, XUtils.AccessPolicy.ShouldExist ).SetParent(_worldAttachTransform, false); var theNewAttach = new UIAttach_ToWorldObjectAttachPoint( inUI.GetComponent <RectTransform>(), inAttachPoint, inDestroyUIWithObject ); _uiAttaches_toWorldObjectAttachPoint.add(theNewAttach); }