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

Method OnUpdate

Source/Editor/Modules/WindowsModule.cs:1112–1140  ·  view source on GitHub ↗

()

Source from the content-addressed store, hash-verified

1110
1111 /// <inheritdoc />
1112 public override void OnUpdate()
1113 {
1114 Profiler.BeginEvent("WindowsModule.Update");
1115
1116 // Auto save workspace layout every few seconds
1117 var now = DateTime.UtcNow;
1118 if (_lastLayoutSaveTime.Ticks > 10 && now - _lastLayoutSaveTime >= TimeSpan.FromSeconds(10))
1119 {
1120 Profiler.BeginEvent("Save Layout");
1121 SaveCurrentLayout();
1122 Profiler.EndEvent();
1123 }
1124
1125 // Auto close on project icon saving end
1126 if (_projectIconScreenshotTimeout > 0 && Time.TimeSinceStartup > _projectIconScreenshotTimeout)
1127 {
1128 Editor.Log("Closing Editor after project icon screenshot");
1129 EditWin.Viewport.SaveProjectIconEnd();
1130 Engine.RequestExit();
1131 }
1132
1133 // Update editor windows
1134 for (int i = 0; i < Windows.Count; i++)
1135 {
1136 Windows[i].OnUpdate();
1137 }
1138
1139 Profiler.EndEvent();
1140 }
1141
1142 /// <inheritdoc />
1143 public override void OnExit()

Callers

nothing calls this directly

Calls 6

FromSecondsMethod · 0.80
SaveProjectIconEndMethod · 0.80
RequestExitMethod · 0.80
BeginEventMethod · 0.45
EndEventMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected