SceneExtensionsclass

objectSceneExtensions
Namespace
Sandbox
Assembly
Sandbox.Tools
Declaration
public static abstract sealed class Sandbox.SceneExtensions

Methods12

Showing 12 methods

public static void CopyToClipboard(Sandbox.Component component)PUBLICSTATIC

Copy the target `Sandbox.Component` to the clipboard.

ParameterTypeDescription
componentComponent
Returns:void

public static Editor.Menu CreateContextMenu(Sandbox.Scene scene, Editor.Widget parent = null)PUBLICSTATIC

We should make this globally reachanle at some point. Should be able to draw icons using bitmaps etc too.

ParameterTypeDescription
sceneScene
parent = nullWidget
Returns:Menu

public static void DisableEditorRigidBodies(Sandbox.Scene scene)PUBLICSTATIC

ParameterTypeDescription
sceneScene
Returns:void

public static void EnableEditorPhysics(Sandbox.Scene scene, bool enabled)PUBLICSTATIC

ParameterTypeDescription
sceneScene
enabledbool
Returns:void

public static void EnableEditorRigidBody(Sandbox.Scene scene, Sandbox.Rigidbody body, bool enabled)PUBLICSTATIC

ParameterTypeDescription
sceneScene
bodyRigidbody
enabledbool
Returns:void

public static bool IsDeletable(Sandbox.GameObject target)PUBLICSTATIC

ParameterTypeDescription
targetGameObject
Returns:bool

public static void PaintComponentIcon(Sandbox.TypeDescription td, Sandbox.Rect rect, float opacity = 1)PUBLICSTATIC

ParameterTypeDescription
tdTypeDescription
rectRect
opacity = 1float
Returns:void

public static void PasteComponent(Sandbox.GameObject target)PUBLICSTATIC

Paste a `Sandbox.Component` as a new component on the target `Sandbox.GameObject`.

ParameterTypeDescription
targetGameObject
Returns:void

public static void PasteValues(Sandbox.Component target)PUBLICSTATIC

Paste component values from clipboard to the target `Sandbox.Component`.

ParameterTypeDescription
targetComponent
Returns:void

public static void SetTargetTransform(Sandbox.Rigidbody body, System.Nullable`1<Transform> tx)PUBLICSTATIC

ParameterTypeDescription
bodyRigidbody
txNullable<Transform>
Returns:void

public static bool ShouldShowInHierarchy(Sandbox.GameObject target)PUBLICSTATIC

Return true if this object should be shown in the GameObject list

ParameterTypeDescription
targetGameObject
Returns:bool

On this page