Exemplo n.º 1
0
    public string HeirarchyPath()
    {
        StringBuilder sb = new StringBuilder();
        PUGameObject  t  = this;

        while (t != null)
        {
            PUGameObject p = t.parent as PUGameObject;
            sb.AppendFormat("{0}.", t.GetType().Name);
            if (p != null)
            {
                sb.AppendFormat("{0}.", p.children.IndexOf(t));
            }
            t = p;
        }
        return(sb.ToString());
    }