You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LowLevel/README.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,11 @@ In each sample there is at least a single ".cs" file containing all the sample c
21
21
22
22
The structure of the ".cs" script file is consistent for all samples and typically contains the following methods:
23
23
24
-
- OnEnable - Grabs the Sandbox Manager and Camera Manipulator and initializes any sample fields. Also, other global physics or sandbox state may be overriden here. Here we always call "SetupOptions" and "SetupScene" (see below).
25
-
- OnDisable - Typically destroys any temporary storage and restores any global physics or Sandbox state.
26
-
- SetupOptions - This is always called from "OnEnable" and always configures the sample UI to dynamically control the sample (sample option in the lower-level UI).
27
-
- SetupScene - This is always called from "OnEnable" but is also called from the sample UI when pressing the "ResetScene" button on all samples. Here is where all the sample physics objects are created.
28
-
- Update - Some samples use this to perform per-frame updates such as world drawing.
29
-
- Misc - Some samples have miscellaneous methods (sometimes used in "SetupScene") to spawn or control the physics objects. Some are hooked into the pre/post simulate to perform an action when the simulation is about to or has run.
30
-
31
-
The "Scripts" folder are typically utility scripts used by various scenes such as spawning physics objects i.e. ragdolls, softbodies etc.
32
-
24
+
-**OnEnable()** - Grabs the Sandbox Manager and Camera Manipulator and initializes any sample fields. Also, other global physics or sandbox state may be overriden here. Here we always call "SetupOptions" and "SetupScene" (see below).
25
+
-**OnDisable()** - Typically destroys any temporary storage and restores any global physics or Sandbox state.
26
+
-**SetupOptions()** - This is always called from "OnEnable" and always configures the sample UI to dynamically control the sample (sample option in the lower-level UI).
27
+
-**SetupScene** - This is always called from "OnEnable" but is also called from the sample UI when pressing the "ResetScene" button on all samples. Here is where all the sample physics objects are created.
28
+
-**Update()** - Some samples use this to perform per-frame updates such as world drawing.
29
+
-**Misc** - Some samples have miscellaneous methods (sometimes used in "SetupScene") to spawn or control the physics objects. Some are hooked into the pre/post simulate to perform an action when the simulation is about to or has run.
30
+
31
+
The "Scripts" folder typically contains utility scripts only used by various scenes such as spawning physics objects i.e. ragdolls, softbodies etc.
0 commit comments