private void UpdateCoordString() { string txt = ""; //txt += "("; txt += _PixelRef.GetIDInSiblings().ToString(); Pixel parentPx = _PixelRef.GetParent(); while (parentPx != null) { txt = "," + txt; txt = parentPx.GetIDInSiblings().ToString() + txt; parentPx = parentPx.GetParent(); } //txt += ""; _Coord = txt; string prefix = gameObject.name; if (_NamePrefix != "") { prefix = _NamePrefix; } if (_bSetGameObjName) { gameObject.name = prefix + _Coord; } }
public Pixel GetRootPixel() { Pixel parent = GetParent(); Pixel pxThis = this; while (parent != null) { pxThis = parent; parent = parent.GetParent(); } return(pxThis); }
public List <int> GetFullPathId() { List <int> ids = new List <int> (); int id = GetIDInSiblings(); ids.Add(id); Pixel parentPixel = GetParent(); while (parentPixel != null) { id = parentPixel.GetIDInSiblings(); ids.Add(id); parentPixel = parentPixel.GetParent(); } ids.Reverse(); return(ids); }