SandboxToolExtensionsclass
Methods20
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.
| Parameter | Type | Description |
|---|---|---|
| player | MoviePlayer | — |
IDisposable—public static string ConstructTitle(Sandbox.SelectionSystem sys)
Create a feasible title from the current selection
| Parameter | Type | Description |
|---|---|---|
| sys | SelectionSystem | — |
string—public static Sandbox.SandboxToolExtensions.PropertyPath FindPathInScene(Sandbox.SerializedProperty prop)
Tries to find the path from a `Sandbox.GameObject` or `Sandbox.Component` to this property. Returns if not found.
| Parameter | Type | Description |
|---|---|---|
| prop | SerializedProperty | — |
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.
| Parameter | Type | Description |
|---|---|---|
| self | Builder | — |
| name | string | — |
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.
| Parameter | Type | Description |
|---|---|---|
| self | Builder | — |
| name | string | — |
public static Editor.Asset[] GetAssets(Sandbox.Project project)
Get all assets in this project
| Parameter | Type | Description |
|---|---|---|
| project | Project | — |
public static Sandbox.GameObject GetContainingGameObject(Sandbox.SerializedProperty prop)
Tries to find the `Sandbox.GameObject` that contains the given property. Returns if not found.
| Parameter | Type | Description |
|---|---|---|
| prop | SerializedProperty | — |
public static Sandbox.SerializedObject GetSerialized(object self)
Shortcut for EditorTypeLibrary.GetSerializedObject( x )
| Parameter | Type | Description |
|---|---|---|
| self | object | — |
public static bool RenderToVideo(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)
| Parameter | Type | Description |
|---|---|---|
| camera | SceneCamera | — |
| videoWriter | VideoWriter | — |
| time = null | Nullable<TimeSpan> | — |
bool—public static System.Threading.Tasks.Task`1<bool> RenderToVideoAsync(Sandbox.SceneCamera camera, Sandbox.VideoWriter videoWriter, System.Nullable`1<System.TimeSpan> time = null)
| Parameter | Type | Description |
|---|---|---|
| camera | SceneCamera | — |
| videoWriter | VideoWriter | — |
| time = null | Nullable<TimeSpan> | — |
Task<bool>—public static System.Threading.Tasks.Task SetFavouriteAsync(Sandbox.Package package, bool state)
Mark this package as a favourite
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
| state | bool | — |
Task—public static System.Threading.Tasks.Task SetVoteAsync(Sandbox.Package package, bool up)
Add your vote for this package
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
| up | bool | — |
Task—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
| Parameter | Type | Description |
|---|---|---|
| package | Package | — |
| key | string | — |
| value | string | — |
| token = null | CancellationToken | — |
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)
Upload a video for this package
| Parameter | Type | Description |
|---|---|---|
| asset | Asset | — |
| contents | byte[] | — |
| isThumbVideo | bool | — |
| hidden = False | bool | — |
| tag = null | string | — |
| progress = null | Callback | — |
| token = null | CancellationToken | — |
Task<bool>—No results match this filter.