()
| 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 | { |
nothing calls this directly
no test coverage detected