Changes

Jump to navigation Jump to search
Line 86: Line 86:     
= Getting Started =
 
= Getting Started =
 +
== Helpful tools ==
 +
Make sure to bind the console key for the following commands in the key bindings section of the options menu (at the bottom).
 +
 +
The '''EXECUTE''' command will allow you to execute arbitrary [[SIPL]] code (which closely resembles C#) while the game is running. E.g. if you wanted to find the highest paid employee you could write '''EXECUTE GameSettings.sActorManager.Actors.OrderByDescending(x.employee.Salary).First()''' or if you wanted to color all selected rooms' exterior green you could write '''EXECUTE Selected.Where(x is Room).ForEach(x.OutsideColor = Color(0,1,0))'''.
 +
 +
The '''SHOW_INSPECTOR''' command opens a window that allows you to inspect objects in the active scene.
 +
 
== Note on threading ==
 
== Note on threading ==
 
You should stick to the ModBehaviour's Update method, rather than trying to write your own update loop with threads or timers, as you cannot interact with Unity's system from other threads and you will most likely end up causing race conditions when interacting with the game's systems. You can use Unity's Time class to keep track of elapsed time between frames.
 
You should stick to the ModBehaviour's Update method, rather than trying to write your own update loop with threads or timers, as you cannot interact with Unity's system from other threads and you will most likely end up causing race conditions when interacting with the game's systems. You can use Unity's Time class to keep track of elapsed time between frames.

Navigation menu