API ReferenceSandbox
SceneExtensionsclass
object→SceneExtensions
Methods12
Showing 12 methods
public static void CopyToClipboard(Sandbox.Component component)
Copy the target `Sandbox.Component` to the clipboard.
| Parameter | Type | Description |
|---|---|---|
| component | Component | — |
Returns:
void—public static Editor.Menu CreateContextMenu(Sandbox.Scene scene, Editor.Widget parent = null)
We should make this globally reachanle at some point. Should be able to draw icons using bitmaps etc too.
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
| parent = null | Widget | — |
public static void DisableEditorRigidBodies(Sandbox.Scene scene)
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
Returns:
void—public static void EnableEditorPhysics(Sandbox.Scene scene, bool enabled)
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
| enabled | bool | — |
Returns:
void—public static void EnableEditorRigidBody(Sandbox.Scene scene, Sandbox.Rigidbody body, bool enabled)
| Parameter | Type | Description |
|---|---|---|
| scene | Scene | — |
| body | Rigidbody | — |
| enabled | bool | — |
Returns:
void—public static System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> GetAll(Sandbox.GameObjectDirectory target)
| Parameter | Type | Description |
|---|---|---|
| target | GameObjectDirectory | — |
public static bool IsDeletable(Sandbox.GameObject target)
| Parameter | Type | Description |
|---|---|---|
| target | GameObject | — |
Returns:
bool—public static void PaintComponentIcon(Sandbox.TypeDescription td, Sandbox.Rect rect, float opacity = 1)
| Parameter | Type | Description |
|---|---|---|
| td | TypeDescription | — |
| rect | Rect | — |
| opacity = 1 | float | — |
Returns:
void—public static void PasteComponent(Sandbox.GameObject target)
Paste a `Sandbox.Component` as a new component on the target `Sandbox.GameObject`.
| Parameter | Type | Description |
|---|---|---|
| target | GameObject | — |
Returns:
void—public static void PasteValues(Sandbox.Component target)
Paste component values from clipboard to the target `Sandbox.Component`.
| Parameter | Type | Description |
|---|---|---|
| target | Component | — |
Returns:
void—public static void SetTargetTransform(Sandbox.Rigidbody body, System.Nullable`1<Transform> tx)
| Parameter | Type | Description |
|---|---|---|
| body | Rigidbody | — |
| tx | Nullable<Transform> | — |
Returns:
void—public static bool ShouldShowInHierarchy(Sandbox.GameObject target)
Return true if this object should be shown in the GameObject list
| Parameter | Type | Description |
|---|---|---|
| target | GameObject | — |
Returns:
bool—No results match this filter.