public static string GetFullName(Transform c) { if (c == null) { return(string.Empty); } Transform parent = c.parent; return(UIPanelStats.GetFullName(parent) + "/" + c.name); }
private UIPanelStats.Entry EnsureExists(List <UIPanelStats.Entry> list, UIPanel panel) { UIPanelStats.Entry entry = list.Find((UIPanelStats.Entry x) => x.panel == panel); if (entry == null) { entry = new UIPanelStats.Entry { panel = panel, name = UIPanelStats.GetFullName(panel.transform), startTime = Time.realtimeSinceStartup }; list.Add(entry); } return(entry); }