то же самое

This commit is contained in:
lapich committed 2026-10-11 19:16:11 +03:00
1 parent 090cdc9933
commit ac99977be3
534 files changed
+36990 -48

No files matched your search

@@ -0,0 +1,38 @@
//
// This file is part of the Tremble package by Tiny Goose.
// Copyright (c) 2024-2026 TinyGoose Ltd., All Rights Reserved.
//
using UnityEditor;
using UnityEngine;
namespace TinyGoose.Tremble.Editor
{
public static class TrembleEditorUtility
{
public delegate void OnHierarchyItemCallback(GameObject gameObject, Rect selectionRect);
public static void RegisterOnHierarchyItem(OnHierarchyItemCallback callback)
{
#if UNITY_6000_5_OR_NEWER
EditorApplication.hierarchyWindowItemByEntityIdOnGUI += (id, rect) =>
{
GameObject go = EditorUtility.EntityIdToObject(id) as GameObject;
if (!go)
return;
callback(go, rect);
};
#else
EditorApplication.hierarchyWindowItemOnGUI += (id, rect) =>
{
GameObject go = EditorUtility.InstanceIDToObject(id) as GameObject;
if (!go)
return;
callback(go, rect);
};
#endif
}
}
}