This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace UnityExplorer
14
14
public class ExplorerCore
15
15
{
16
16
public const string NAME = "UnityExplorer" ;
17
- public const string VERSION = "3.3.13 " ;
17
+ public const string VERSION = "3.3.14 " ;
18
18
public const string AUTHOR = "Sinai" ;
19
19
public const string GUID = "com.sinai.unityexplorer" ;
20
20
Original file line number Diff line number Diff line change @@ -199,23 +199,8 @@ public void InitConsole()
199
199
InputField . onValueChanged . AddListener ( ( string s ) => { OnInputChanged ( s ) ; } ) ;
200
200
}
201
201
202
- internal static bool IsUserCopyPasting ( )
203
- {
204
- return ( InputManager . GetKey ( KeyCode . LeftControl ) || InputManager . GetKey ( KeyCode . RightControl ) )
205
- && InputManager . GetKeyDown ( KeyCode . V ) ;
206
- }
207
-
208
202
public void UpdateConsole ( )
209
203
{
210
- if ( s_copyPasteBuffer != null )
211
- {
212
- if ( ! IsUserCopyPasting ( ) )
213
- {
214
- OnInputChanged ( s_copyPasteBuffer ) ;
215
-
216
- s_copyPasteBuffer = null ;
217
- }
218
- }
219
204
220
205
if ( EnableCtrlRShortcut )
221
206
{
@@ -288,16 +273,14 @@ public void UseAutocomplete(string suggestion)
288
273
AutoCompleter . ClearAutocompletes ( ) ;
289
274
}
290
275
291
- internal static string s_copyPasteBuffer ;
276
+ private static float s_timeOfLastUpdate ;
292
277
293
278
public void OnInputChanged ( string newText , bool forceUpdate = false )
294
279
{
295
- if ( IsUserCopyPasting ( ) )
296
- {
297
- //Console.WriteLine("Copy+Paste detected!");
298
- s_copyPasteBuffer = newText ;
280
+ if ( Time . time <= s_timeOfLastUpdate )
299
281
return ;
300
- }
282
+
283
+ s_timeOfLastUpdate = Time . time ;
301
284
302
285
if ( EnableAutoIndent )
303
286
UpdateIndent ( newText ) ;
You can’t perform that action at this time.
0 commit comments