API ReferenceSandbox
SceneUtilityclass
object→SceneUtility
Methods10
Showing 10 methods
public static Sandbox.PrefabScene GetPrefabScene(Sandbox.PrefabFile prefabFile)
Get a (cached) scene from a PrefabFile
| Parameter | Type | Description |
|---|---|---|
| prefabFile | PrefabFile | — |
public static void MakeGameObjectsUnique(System.Text.Json.Nodes.JsonObject json, System.Nullable`1<System.Guid> rootGuid = null)
Obsolete: Use MakeIdGuidsUnique
| Parameter | Type | Description |
|---|---|---|
| json | JsonObject | — |
| rootGuid = null | Nullable<Guid> | — |
Returns:
void—public static System.Collections.Generic.Dictionary`2<System.Guid,System.Guid> MakeIdGuidsUnique(System.Text.Json.Nodes.JsonObject json, System.Nullable`1<System.Guid> rootGuid = null)
| Parameter | Type | Description |
|---|---|---|
| json | JsonObject | — |
| rootGuid = null | Nullable<Guid> | — |
Returns:
Dictionary<Guid,Guid>—public static void RenderGameObjectToBitmap(Sandbox.GameObject objSource, Sandbox.Bitmap bitmap)
Render a GameObject to a bitmap. This is usually used for easily rendering "previews" of GameObjects, for things like saving thumbnails etc.
| Parameter | Type | Description |
|---|---|---|
| objSource | GameObject | — |
| bitmap | Bitmap | — |
Returns:
void—public static void RenderModelBitmap(Sandbox.Model model, Sandbox.Bitmap bitmap)
Render a Model to a bitmap. This is usually used for easily rendering "previews" of Models for thumbnails
| Parameter | Type | Description |
|---|---|---|
| model | Model | — |
| bitmap | Bitmap | — |
Returns:
void—public static void RunInBatchGroup(System.Action action)
Run an action inside a batch group. A batchgroup is used with GameObject and Components to make sure that their OnEnable/OnDisable and other callbacks are called in a deterministic order, and that they can find each other during creation.
Obsolete: Use Scene.BatchGroup() instead
| Parameter | Type | Description |
|---|---|---|
| action | Action | — |
Returns:
void—No results match this filter.