class Game
😔 No documentation found.
public static ulong AppId { get; }
Steam AppId of S&box.
public static bool InGame { get; }
Return true if we're in a game (ie, not in the main menu)
public static bool IsEditor { get; }
Returns true if the game is running with the editor enabled
public static string Ident { get; }
Returns the current game's ident - ie facepunch.sandbox
public static bool IsMainMenuVisible { get; }
Returns true if the main menu is visible. Note that this will work serverside too but will only return the state of the host.
public static bool IsRecordingVideo { get; }
True if we're currently recording a video (using the video command, or F6)
public static bool IsClosing { get; }
Set to true when the game is closing
public static bool IsRunningInVR { get; }
Return true if we're running in VR
public static bool IsRunningOnHandheld { get; }
Return true if we're running on a handheld device (the deck). Will always be false serverside.
public static Random Random { get; }
A shared random that is automatically seeded on tick
public static void SetRandomSeed( int seed )
Set the seed for Game.Random
public static SteamId SteamId { get; }
Your SteamId
public static PhysicsTraceBuilder PhysicsTrace { get; }
Trace against the physics in the current scene
public static SceneTrace SceneTrace { get; }
Trace against the physics and hitboxes in the current scene
public static void Load( string gameIdent, bool keepClients )
Load a game. You can configure the new game with LaunchArguments before calling this.
public static bool CheatsEnabled { get; set; }
This has to be in Game.dll so the codegen will get generated for it
public static void AssertMenu( string memberName = )
Throws an exception when called from client or server.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public static Scene ActiveScene { get; }
😔 No documentation found.
public static bool IsPaused { get; set; }
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public static void TakeScreenshot( )
😔 No documentation found.
public static void Close( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public static WebSurface CreateWebSurface( )
😔 No documentation found.
public static bool IsPlaying { get; }
😔 No documentation found.
public static void Disconnect( )
😔 No documentation found.