com.soosvet_games.common_tools 1.1.3 → 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 )
@@ -20,16 +20,16 @@ namespace SoosvetGames.CommonTools.Services.VibrationService
20
20
  #endif
21
21
  }
22
22
 
23
+ #if UNITY_IOS && !UNITY_EDITOR
23
24
  public void VibrateIOS( ImpactFeedbackStyle style )
24
25
  {
25
- #if UNITY_IOS && !UNITY_EDITOR
26
26
  Vibration.VibrateIOS( style );
27
- #endif
28
27
  }
28
+ #endif
29
29
 
30
+ #if UNITY_ANDROID && !UNITY_EDITOR
30
31
  public void VibrateAndroid( VibrationType type )
31
32
  {
32
- #if UNITY_ANDROID && !UNITY_EDITOR
33
33
  switch ( type )
34
34
  {
35
35
  case VibrationType.Pop:
@@ -47,7 +47,7 @@ namespace SoosvetGames.CommonTools.Services.VibrationService
47
47
  default:
48
48
  throw new ArgumentOutOfRangeException( nameof(type), type, null );
49
49
  }
50
- #endif
51
50
  }
51
+ #endif
52
52
  }
53
53
  }
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.3",
4
+ "version" : "1.1.5",
5
5
  "author" : "Soosvet Games",
6
6
  "description" : "Common tools for Unity.",
7
7
  "repository": {