This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace UnityExplorer
16
16
public class ExplorerCore
17
17
{
18
18
public const string NAME = "UnityExplorer" ;
19
- public const string VERSION = "3.1.0 " ;
19
+ public const string VERSION = "3.1.1 " ;
20
20
public const string AUTHOR = "Sinai" ;
21
21
public const string GUID = "com.sinai.unityexplorer" ;
22
22
public const string EXPLORER_FOLDER = @"Mods\UnityExplorer" ;
Original file line number Diff line number Diff line change @@ -111,8 +111,11 @@ internal void RefreshComponentList()
111
111
internal static void OnCompToggleClicked ( int index , bool value )
112
112
{
113
113
var comp = s_compShortlist [ index ] ;
114
-
114
+ #if CPP
115
+ comp . TryCast < Behaviour > ( ) . enabled = value ;
116
+ #else
115
117
( comp as Behaviour ) . enabled = value ;
118
+ #endif
116
119
}
117
120
118
121
internal static void OnCompListObjectClicked ( int index )
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
- //using TMPro;
5
4
using UnityEngine ;
6
5
using UnityEngine . SceneManagement ;
7
6
using UnityEngine . UI ;
@@ -51,8 +50,6 @@ public class SearchPage : MainMenu.Page
51
50
private SceneFilter m_sceneFilter ;
52
51
private ChildFilter m_childFilter ;
53
52
54
- internal bool m_isStaticClassSearching ;
55
-
56
53
// ui elements
57
54
58
55
private Text m_resultCountText ;
@@ -257,8 +254,6 @@ internal void OnSearchClicked()
257
254
258
255
internal void StaticClassSearch ( )
259
256
{
260
- m_isStaticClassSearching = true ;
261
-
262
257
var list = new List < Type > ( ) ;
263
258
264
259
var nameFilter = "" ;
@@ -295,8 +290,6 @@ internal void StaticClassSearch()
295
290
296
291
private void SingletonSearch ( )
297
292
{
298
- m_isStaticClassSearching = false ;
299
-
300
293
var instances = new List < object > ( ) ;
301
294
302
295
var nameFilter = "" ;
@@ -356,8 +349,6 @@ private void SingletonSearch()
356
349
357
350
internal void UnityObjectSearch ( )
358
351
{
359
- m_isStaticClassSearching = false ;
360
-
361
352
Type searchType = null ;
362
353
switch ( m_context )
363
354
{
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ public static void OnSceneChange()
46
46
SearchPage . Instance ? . OnSceneChange ( ) ;
47
47
}
48
48
49
+ #if CPP
50
+ internal static float s_timeOfLastClick ;
51
+ #endif
49
52
public static void Update ( )
50
53
{
51
54
MainMenu . Instance ? . Update ( ) ;
@@ -54,6 +57,7 @@ public static void Update()
54
57
{
55
58
if ( EventSystem . current != EventSys )
56
59
{
60
+ ExplorerCore . Log ( "Forcing EventSystem to UnityExplorer's" ) ;
57
61
ForceUnlockCursor . SetEventSystem ( ) ;
58
62
}
59
63
@@ -62,8 +66,18 @@ public static void Update()
62
66
var evt = InputManager . InputPointerEvent ;
63
67
if ( evt != null )
64
68
{
65
- if ( ! evt . eligibleForClick && evt . selectedObject )
66
- evt . eligibleForClick = true ;
69
+ if ( Time . realtimeSinceStartup - s_timeOfLastClick > 0.1f )
70
+ {
71
+ s_timeOfLastClick = Time . realtimeSinceStartup ;
72
+
73
+ if ( ! evt . eligibleForClick && evt . selectedObject )
74
+ evt . eligibleForClick = true ;
75
+ }
76
+ else
77
+ {
78
+ if ( evt . eligibleForClick )
79
+ evt . eligibleForClick = false ;
80
+ }
67
81
}
68
82
#endif
69
83
}
You can’t perform that action at this time.
0 commit comments