本文整理汇总了C#中UnityEngine.Transform.SetAsLastSibling方法的典型用法代码示例。如果您正苦于以下问题:C# Transform.SetAsLastSibling方法的具体用法?C# Transform.SetAsLastSibling怎么用?C# Transform.SetAsLastSibling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.Transform
的用法示例。
在下文中一共展示了Transform.SetAsLastSibling方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToFront
/// <summary>
/// TBring to front specified object.
/// </summary>
/// <param name="obj">Object.</param>
void ToFront(Transform obj)
{
obj.SetAsLastSibling();
if (WithParents && (obj.parent!=null))
{
ToFront(obj.parent);
}
}
示例2: MouseHoverStart
protected virtual void MouseHoverStart()
{
IBigCardSpawnable bigCardSpawner = GetComponent<CardGraphic>() as IBigCardSpawnable;
createdBigCardGraphic = bigCardSpawner.CreateBigCardGraphic();
createdBigCardGraphic.transform.localScale = new Vector3(1.1f, 1.1f, 1f);
createdBigCardGraphic.transform.SetParent(transform.parent, false);
createdBigCardGraphic.transform.position = transform.position;
//createdBigCardGraphic.transform.SetAsLastSibling();
createdBigCardGraphic.GetComponent<LayoutElement>().ignoreLayout = true;
Transform canvasTransform = transform.GetComponentInParent<Canvas>().transform;
createdBigCardGraphic.transform.SetParent(canvasTransform, true);
createdBigCardGraphic.SetAsLastSibling();
}
示例3: UpdatePanels
private void UpdatePanels(Transform panel)
{
if (panel)
{
panel.gameObject.SetActive(true);
panel.SetAsLastSibling();
}
GameObject defaultButton = panel.GetComponent<MenuOption>().DefaultButton;
if (defaultButton)
{
EventSystem.current.SetSelectedGameObject(defaultButton);
Navigator.defaultGameObject = defaultButton;
}
if (activePanel) activePanel.gameObject.SetActive(false);
activePanel = panel;
}
示例4: SetTransform
/// <summary>
/// 设置卡牌大小位置
/// </summary>
/// <param name="vTransform"></param>
public void SetTransform( Transform vTransform , int vPos )
{
vTransform.gameObject.SetActive(false);
vTransform.SetParent(this.FightPanel.transform);
vTransform.GetComponent<RectTransform>().anchoredPosition = mindPosList[vPos];
vTransform.GetComponent<RectTransform>().sizeDelta = vTransform.GetComponent<RectTransform>().sizeDelta * mineCardScale;
vTransform.localScale = Vector3.one;
vTransform.SetAsLastSibling();
}
示例5: AttachChild
private void AttachChild(Transform child)
{
child.SetParent(ItemsPanel);
child.SetAsLastSibling();
_elements.Add(child);
}
示例6: AttachChild
private void AttachChild(Transform child)
{
child.SetParent(_attributesContainer);
child.SetAsLastSibling();
_newAttributeField.transform.SetAsLastSibling();
}