private void OnBindItem(object sender, TreeBindItemEventArgs <HierarchyItem, ILevelEditorObject> e) { e.TreeItem.LabelText.text = e.Item.MyGameObject.name; e.TreeItem.HasChildren = e.Item.HasChildren(); #if UNITY_EDITOR e.TreeItem.gameObject.name = $"Item - {e.Item.MyGameObject.name}"; #endif }
private void OnBindTreeItem(object sender, TreeBindItemEventArgs <TreeItem, object> e) { if (e.Item is LevelEditorResource resource) { e.TreeItem.LabelText.text = resource.Name; e.TreeItem.HasChildren = resource.HasChildren(); #if UNITY_EDITOR e.TreeItem.gameObject.name = $"Item - {resource.Name}"; #endif } }