SandboxToolExtensionsclass

objectSandboxToolExtensions
Namespace
Sandbox
Assembly
Sandbox.Tools
Declaration
public static abstract sealed class Sandbox.SandboxToolExtensions

Methods20

Showing 20 methods

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

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

ParameterTypeDescription
playerMoviePlayer
Returns:IDisposable

public static string ConstructTitle(Sandbox.SelectionSystem sys)PUBLICSTATIC

Create a feasible title from the current selection

ParameterTypeDescription
sysSelectionSystem
Returns:string

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

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

ParameterTypeDescription
selfBuilder
namestring
Returns:Link

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

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

ParameterTypeDescription
selfBuilder
namestring
Returns:Link

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

Get all assets in this project

ParameterTypeDescription
projectProject
Returns:Asset[]

public static Sandbox.SerializedObject GetSerialized(object self)PUBLICSTATIC

Shortcut for EditorTypeLibrary.GetSerializedObject( x )

ParameterTypeDescription
selfobject
Returns:SerializedObject

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

ParameterTypeDescription
cameraSceneCamera
videoWriterVideoWriter
time = nullNullable<TimeSpan>
Returns:bool

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

ParameterTypeDescription
cameraSceneCamera
videoWriterVideoWriter
time = nullNullable<TimeSpan>
Returns:Task<bool>

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

Mark this package as a favourite

ParameterTypeDescription
packagePackage
statebool
Returns:Task

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

Add your vote for this package

ParameterTypeDescription
packagePackage
upbool
Returns:Task

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

Update a value on this package

ParameterTypeDescription
packagePackage
keystring
valuestring
token = nullCancellationToken
Returns:Task

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)PUBLICSTATIC

Upload a video for this package

ParameterTypeDescription
assetAsset
contentsbyte[]
isThumbVideobool
hidden = Falsebool
tag = nullstring
progress = nullCallback
token = nullCancellationToken
Returns:Task<bool>

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

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

ParameterTypeDescription
resourceResource
ct = nullCancellationToken
Returns:Task

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