| | |
| | | vertexHelper.AddTriangle(currentVertCount, currentVertCount + 1, currentVertCount + 2); |
| | | } |
| | | |
| | | // public static string GetUIElementRelativePath(UIRoot _root, Transform _transform) |
| | | // { |
| | | // List<Transform> parents = new List<Transform>() { _transform }; |
| | | // GetParents(_transform, ref parents); |
| | | |
| | | // if (parents.Contains(_root.transform)) |
| | | // { |
| | | // parents.Remove(_root.transform); |
| | | // } |
| | | |
| | | // var names = new string[parents.Count]; |
| | | // for (int i = 0; i < names.Length; i++) |
| | | // { |
| | | // names[i] = parents[i].gameObject.name; |
| | | // } |
| | | |
| | | // return string.Join("/", names); |
| | | // } |
| | | |
| | | public static void GetParents(Transform _transform, ref List<Transform> _parents) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public static string GetUIElementRelativePath(Transform _root, Transform _transform) |
| | | { |
| | | List<Transform> parents = new List<Transform>() { _transform }; |
| | | GetParents(_transform, ref parents); |
| | | |
| | | if (parents.Contains(_root)) |
| | | { |
| | | parents.Remove(_root); |
| | | } |
| | | |
| | | var names = new string[parents.Count]; |
| | | for (int i = 0; i < names.Length; i++) |
| | | { |
| | | names[i] = parents[i].gameObject.name; |
| | | } |
| | | |
| | | return string.Join("/", names); |
| | | } |
| | | } |