GetSiblingIndex获取对象在Hierarchy面板的索引值(可以用于动态修改UGUI中UI的显示效果)
using UnityEngine;
using System.Collections;
using System;
public class Path : MonoBehaviour {
public GameObject A;
public GameObject B;
// Use this for initialization
void Start () {
int AIndex = A.transform.GetSiblingIndex();
int BIndex = B.transform.GetSiblingIndex();
Debug.Log(AIndex+"A");
Debug.Log(BIndex);
A.transform.SetSiblingIndex(BIndex);
B.transform.SetSiblingInd