MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / Update

Method Update

Examples/StereoKitTest/Tests.cs:50–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 nextScene = (ITest)Activator.CreateInstance(allTests[testIndex]);
49 }
50 public static void Update()
51 {
52 if (IsTesting && runSeconds != 0)
53 Time.SetTime(Time.Total+(1/90.0), 1/90.0);
54
55 if (nextScene != null)
56 {
57 activeScene?.Shutdown();
58 GC.Collect(int.MaxValue, GCCollectionMode.Forced);
59 if (IsTesting)
60 {
61 Time.SetTime(0);
62 Input.HandVisible(Handed.Max, false);
63 Input.HandClearOverride(Handed.Left);
64 Input.HandClearOverride(Handed.Right);
65 }
66
67 nextScene.Initialize();
68 if (IsTesting)
69 Assets.BlockForPriority(int.MaxValue);
70 sceneTime = Time.Totalf;
71 activeScene = nextScene;
72 nextScene = null;
73 }
74 activeScene.Step();
75 sceneFrame++;
76
77 if (IsTesting && FinishedWithTest())
78 {
79 testIndex += 1;
80 if (testIndex >= allTests.Count || TestSingle)
81 SK.Quit();
82 else
83 SetTestActive(allTests[testIndex].Name);
84 }
85 }
86 public static void Shutdown()
87 {
88 activeScene?.Shutdown();

Callers 1

StepMethod · 0.80

Calls 7

SetTimeMethod · 0.80
HandVisibleMethod · 0.80
HandClearOverrideMethod · 0.80
BlockForPriorityMethod · 0.80
QuitMethod · 0.80
InitializeMethod · 0.45
StepMethod · 0.45

Tested by

no test coverage detected