MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Internal_Update

Method Internal_Update

Source/Engine/Scripting/Scripting.cs:327–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325 }
326
327 internal static void Internal_Update()
328 {
329 Update?.Invoke();
330
331 lock (UpdateActions)
332 {
333 int count = UpdateActions.Count;
334 for (int i = 0; i < count; i++)
335 {
336 try
337 {
338 UpdateActions[i]();
339 }
340 catch (Exception ex)
341 {
342 Debug.LogException(ex);
343 }
344 }
345 int newlyAdded = UpdateActions.Count - count;
346 if (newlyAdded == 0)
347 UpdateActions.Clear();
348 else
349 {
350 // Someone added another action within current callback
351 var tmp = new List<Action>();
352 for (int i = newlyAdded; i < UpdateActions.Count; i++)
353 tmp.Add(UpdateActions[i]);
354 UpdateActions.Clear();
355 UpdateActions.AddRange(tmp);
356 }
357 }
358
359 MainThreadTaskScheduler.Execute();
360 }
361
362 internal static void Internal_LateUpdate()
363 {

Callers

nothing calls this directly

Calls 5

LogExceptionMethod · 0.45
ClearMethod · 0.45
AddMethod · 0.45
AddRangeMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected