class SandboxGameExtensions

in global :: Sandbox

😔 No documentation found.


public static void Reset( ClothingContainer self, SkinnedModelRenderer body )

Clear the outfit from this model, make it named

public static void Apply( ClothingContainer self, SkinnedModelRenderer body )

Dress a skinned model renderer with an outfit

public static Task<BaseFileSystem> MountAsync( Package package )

Download and mount this package. If withCode is true we'll try to load the assembly if it exists.

public static bool IsMounted( Package package )

Check if the package is installed and mounted

public static SoundHandle PlayCollisionSound( Surface self, Vector3 position, float speed = 320 )

Play a collision sound based on this shape's surface. Can return null if sound is invalid, or too quiet to play.

public static Vector3 ToScreen( Vector3 self )

Clientside, returns position of this 3D vector on local clients' screen in 2D coordinates based on the Camera

  • self The vector to transform/project.
  • Returns The position of this vector3 on the local clients' screen. X and Y components are in range of 0 (left, top) to 1 (right, bottom). The Z component stores whether this vector is behind the screen (<0) or in front of it (>0).

public static Nullable<Vector2> ToScreen( Vector3 self, Vector2 screenSize )

Same as , but return value is in absolute coordinates.

  • self The vector to transform/project.
  • screenSize Screen size. You probably want to use .
  • Returns Will return null if this vector is behind the screen, otherwise returns position of it on the local clients' screen.

public static void Draw( VertexBuffer self, Material material, RenderAttributes attributes = null )

Draw this mesh using Material

public string ToString( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public static Component GetComponent( SceneObject self )

😔 No documentation found.

public static GameObject GetGameObject( SceneObject self )

😔 No documentation found.

public static void SetComponentSource( SceneObject self, Component comp )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public static SoundHandle PlayFootLandSound( PhysicsShape self, Vector3 position, float volume = 1 )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public static Component GetComponent( PhysicsBody self )

😔 No documentation found.

public static GameObject GetGameObject( PhysicsBody self )

😔 No documentation found.

public static void SetComponentSource( PhysicsBody self, Component comp )

😔 No documentation found.

public static bool IsMounted( Package package, bool downloadAndMount = False, bool withCode = False )

😔 No documentation found.

public static Task<BaseFileSystem> MountAsync( Package package, bool withCode = False )

😔 No documentation found.

public static Dictionary<BoneCollection.Bone,GameObject> CreateBoneObjects( Model self, GameObject root )

😔 No documentation found.

public static SoundHandle PlayFootLaunchSound( PhysicsShape self, Vector3 position, float volume = 1 )

😔 No documentation found.

public static SoundHandle PlayFootstepSound( PhysicsShape self, Vector3 position, bool left, float volume = 1 )

😔 No documentation found.