com.soosvet_games.common_tools 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,9 +8,24 @@ namespace SoosvetGames.CommonTools.Extensions.Editor
8
8
  {
9
9
  static HierarchyActivationTool()
10
10
  {
11
+ #if UNITY_6000_5_OR_NEWER
12
+ EditorApplication.hierarchyWindowItemByEntityIdOnGUI += HierarchyWindowOnGui;
13
+ #else
11
14
  EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowOnGui;
15
+ #endif
12
16
  }
13
17
 
18
+ #if UNITY_6000_5_OR_NEWER
19
+
20
+ private static void HierarchyWindowOnGui( EntityId entityId,Rect selectionRect )
21
+ {
22
+ var obj = EditorUtility.EntityIdToObject(entityId) as GameObject;
23
+
24
+ DrawToggle(obj, selectionRect);
25
+ }
26
+
27
+ #else
28
+
14
29
  private static void HierarchyWindowOnGui( int instanceId, Rect selectionRect )
15
30
  {
16
31
  var obj = EditorUtility.InstanceIDToObject( instanceId ) as GameObject;
@@ -18,6 +33,8 @@ namespace SoosvetGames.CommonTools.Extensions.Editor
18
33
  DrawToggle( obj, selectionRect );
19
34
  }
20
35
 
36
+ #endif
37
+
21
38
  private static void DrawToggle( GameObject obj, Rect selectionRect )
22
39
  {
23
40
  if ( obj == null )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name" : "com.soosvet_games.common_tools",
3
3
  "displayName" : "Soosvet Games Common Tools",
4
- "version" : "1.1.4",
4
+ "version" : "1.1.5",
5
5
  "author" : "Soosvet Games",
6
6
  "description" : "Common tools for Unity.",
7
7
  "repository": {