File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
UnityProject/Assets/Dependencies/JEngine
Editor/JEngineTools/EditorUpdates Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using UnityEngine ;
3
2
using System . Collections . Generic ;
4
3
using System . Collections . Concurrent ;
5
4
@@ -103,25 +102,31 @@ public static void QueueOnMainThread(Action action)
103
102
/// <param name="time"></param>
104
103
public static void QueueOnMainThread ( Action action , float time )
105
104
{
106
- Delayed . Enqueue ( new DelayedQueueItem { Time = Time . time + time , Action = action } ) ;
105
+ Delayed . Enqueue ( new DelayedQueueItem { Time = _curTime + time , Action = action } ) ;
107
106
}
108
107
109
108
/// <summary>
110
109
/// Current actions to process
111
110
/// </summary>
112
111
private static readonly List < Action > CurActions = new List < Action > ( 100 ) ;
112
+
113
+ /// <summary>
114
+ /// Current time
115
+ /// </summary>
116
+ private static float _curTime ;
113
117
114
118
/// <summary>
115
119
/// Update loop on main thread
116
120
/// </summary>
117
121
static void Update ( )
118
122
{
123
+ _curTime = UnityEngine . Time . time ;
119
124
var i = Delayed . Count ;
120
125
while ( i -- > 0 )
121
126
{
122
127
if ( Delayed . TryDequeue ( out var item ) )
123
128
{
124
- if ( item . Time <= Time . time )
129
+ if ( item . Time <= _curTime )
125
130
{
126
131
CurActions . Add ( item . Action ) ;
127
132
}
@@ -140,7 +145,7 @@ static void Update()
140
145
}
141
146
catch ( Exception e )
142
147
{
143
- Debug . LogException ( e ) ;
148
+ UnityEngine . Debug . LogException ( e ) ;
144
149
}
145
150
}
146
151
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ private static void InjectDefineSymbol()
59
59
var group = BuildPipeline . GetBuildTargetGroup ( target ) ;
60
60
var org = PlayerSettings . GetScriptingDefineSymbolsForGroup ( group ) ;
61
61
var d = PlayerSettings . GetScriptingDefineSymbolsForGroup ( group ) ;
62
- string [ ] Symbols = new string [ ] { "INIT_JE" } ;
62
+ string [ ] Symbols = new string [ ] { "INIT_JE" , "ILRuntime" } ;
63
63
List < string > dfList = d . Split ( ';' ) . ToList ( ) ;
64
64
dfList . AddRange ( Symbols . Except ( dfList ) ) ;
65
65
d = string . Join ( ";" , dfList . Distinct ( ) . ToArray ( ) ) ;
You can’t perform that action at this time.
0 commit comments