s&box docs

public static abstract sealed class Sandbox.SandboxToolExtensions

Methods

Showing 20 methods

public static System.IDisposable BeginApplyFrame(Sandbox.MovieMaker.MoviePlayer player)

Creates a scope for applying a frame in a `Sandbox.MovieMaker.MoviePlayer`. Dispose after modifying any properties controlled by the movie.

public static string ConstructTitle(Sandbox.SelectionSystem sys)

Create a feasible title from the current selection

public static Sandbox.Bind.Link FromConsoleVariable(Sandbox.Bind.Builder self, string name)

Bind the Left hand side to the value of the given console variable.

public static Sandbox.Bind.Link FromConsoleVariableInt(Sandbox.Bind.Builder self, string name)

Bind the Left hand side to the value of the given console variable as an integer.

public static Editor.Asset[] GetAssets(Sandbox.Project project)

Get all assets in this project

public static Sandbox.GameObject GetContainingGameObject(Sandbox.SerializedProperty prop)

Tries to find the `Sandbox.GameObject` that contains the given property. Returns if not found.

public static Sandbox.SerializedObject GetSerialized(object self)

Shortcut for EditorTypeLibrary.GetSerializedObject( x )

public static bool RenderToVideo(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)

Parameters

  • time: Default: null

public static System.Threading.Tasks.Task`1<bool> RenderToVideoAsync(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)

Parameters

  • time: Default: null

public static System.Threading.Tasks.Task SetFavouriteAsync(Sandbox.Package package, bool state)

Mark this package as a favourite

public static System.Threading.Tasks.Task SetVoteAsync(Sandbox.Package package, bool up)

Add your vote for this package

public static System.Threading.Tasks.Task UpdateValue(Sandbox.Package package, string key, string value, System.Threading.CancellationToken token = null)

Update a value on this package

Parameters

  • token: Default: null

public static System.Threading.Tasks.Task`1<bool> UploadVideo(Editor.Asset asset, byte[] contents, bool isThumbVideo, bool hidden = False, string tag = null, Sandbox.Utility.DataProgress.Callback progress = null, System.Threading.CancellationToken token = null)

Upload a video for this package

Parameters

  • hidden: Default: False
  • tag: Default: null
  • progress: Default: null
  • token: Default: null

public static System.Threading.Tasks.Task WaitForLoadAsync(Sandbox.Resource resource, System.Threading.CancellationToken ct = null)

Creates a task that completes when `resource` is fully loaded.

Parameters

  • ct: Default: null

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Tools
Doc IDT:Sandbox.SandboxToolExtensions

On this page

Methodspublic static System.IDisposable BeginApplyFrame(Sandbox.MovieMaker.MoviePlayer player)public static System.String ConstructTitle(Sandbox.SelectionSystem sys)public static Sandbox.SandboxToolExtensions.PropertyPath FindPathInScene(Sandbox.SerializedProperty prop)public static Sandbox.Bind.Link FromConsoleVariable(Sandbox.Bind.Builder self, System.String name)public static Sandbox.Bind.Link FromConsoleVariableInt(Sandbox.Bind.Builder self, System.String name)public static Editor.Asset[] GetAssets(Sandbox.Project project)public static Sandbox.GameObject GetContainingGameObject(Sandbox.SerializedProperty prop)public static Sandbox.SerializedObject GetSerialized(System.Object self)public static System.Boolean RenderToPixmap(Sandbox.CameraComponent camera, Editor.Pixmap targetPixmap, System.Boolean async = False)public static System.Boolean RenderToPixmap(Sandbox.Scene scene, Editor.Pixmap targetPixmap, System.Boolean async = False)public static System.Boolean RenderToPixmap(Sandbox.SceneCamera camera, Editor.Pixmap targetPixmap, System.Boolean async = False)public static System.Boolean RenderToVideo(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)public static System.Threading.Tasks.Task`1<System.Boolean> RenderToVideoAsync(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)public static System.Threading.Tasks.Task SetFavouriteAsync(Sandbox.Package package, System.Boolean state)public static System.Threading.Tasks.Task SetVoteAsync(Sandbox.Package package, System.Boolean up)public static System.Threading.Tasks.Task UpdateValue(Sandbox.Package package, System.String key, System.String value, System.Threading.CancellationToken token = null)public static System.Threading.Tasks.Task`1<System.Boolean> UploadFile(Sandbox.Package package, System.Byte[] contents, System.String relativePath, Sandbox.Utility.DataProgress.Callback progress, System.Threading.CancellationToken token = null)public static System.Threading.Tasks.Task`1<System.Boolean> UploadFile(Sandbox.Package package, System.String absolutePath, System.String relativePath, Sandbox.Utility.DataProgress.Callback progress, System.Threading.CancellationToken token = null)public static System.Threading.Tasks.Task`1<System.Boolean> UploadVideo(Editor.Asset asset, System.Byte[] contents, System.Boolean isThumbVideo, System.Boolean hidden = False, System.String tag = null, Sandbox.Utility.DataProgress.Callback progress = null, System.Threading.CancellationToken token = null)public static System.Threading.Tasks.Task WaitForLoadAsync(Sandbox.Resource resource, System.Threading.CancellationToken ct = null)Metadata