---
title: "Scene Loading Utility - s&box library"
description: "About Scene Loading Utility\n\nA custom scene loading library that allows for manipulation of the scene file before loading\n\nApi\n\npublic class CustomScene\n{\n public CustomScene( SceneFile sceneFile );\n\n //Creates an object in the custom scene\n public void CreateObject( GameObject gameObject );\n\n //Get a json object\n\n //Find all objects by a type of a component\n public IEnumerable<JsonObject> GetAllObjectsByType( Type type );\n\n //Gets an object within the scene from a guid\n public IEnumerable<JsonObject> GetAllObjectsByGuid( string guid );\n\n //Gets an object within the scene from a name\n public IEnumerable<JsonNode> GetAllObjectsByName( string name )\n\n //Manipulate the json object\n\n //Adds a component to a json object by a type\n public void AddComponentByType( JsonObject obj, Type componentType )\n\n //Adds a component from a json object to a JsonObject GameObject\n public void AddComponent( JsonObject obj, JsonObject newComponent )\n\n //Removes a component by a type from a JsonObject\n public void RemoveComponentByType( JsonObject obj, Type type )\n\n //Remove an object from the scene\n public void RemoveObject( JsonNode obj )\n\n //Loads the custom scene\n public void LoadScene();\n}\n\nExample\n\npublic void LoadScene()\n{\n var customScene = new CustomScene( sceneFile );\n if ( customScene.GetAllObjectsByType( typeof( SkinnedModelRenderer ) ).Count() == 0 )\n {\n customScene.CreateObject( new GameObject() );\n }\n\n customScene.LoadScene();\n}"
canonical: "https://sbox.watch/libraries/nolankicks/sceneloadingutility/"
generated_at: "2026-07-22T23:23:23.314Z"
---

# Scene Loading Utility

No summary provided.

- Type: library
- Ident: nolankicks.sceneloadingutility
- Creator: kicks
- Canonical: https://sbox.watch/libraries/nolankicks/sceneloadingutility/
- Markdown: https://sbox.watch/libraries/nolankicks/sceneloadingutility.md
- sbox.game: https://sbox.game/nolankicks/sceneloadingutility/
- Generated: 2026-07-22T23:23:23.314Z

## Stats

- 24h momentum: +0
- Terry score: --
- Favorites: 0
- Upvotes: 0
- Downvotes: 0
- Updated: Aug 10, 2024
- Created: Jul 29, 2024
- Size: 252.5 KB
- Files: 31
- Tags: 

## Description

About Scene Loading Utility

A custom scene loading library that allows for manipulation of the scene file before loading

Api

public class CustomScene
{
 public CustomScene( SceneFile sceneFile );

 //Creates an object in the custom scene
 public void CreateObject( GameObject gameObject );

 //Get a json object

 //Find all objects by a type of a component
 public IEnumerable<JsonObject> GetAllObjectsByType( Type type );

 //Gets an object within the scene from a guid
 public IEnumerable<JsonObject> GetAllObjectsByGuid( string guid );

 //Gets an object within the scene from a name
 public IEnumerable<JsonNode> GetAllObjectsByName( string name )

 //Manipulate the json object

 //Adds a component to a json object by a type
 public void AddComponentByType( JsonObject obj, Type componentType )

 //Adds a component from a json object to a JsonObject GameObject
 public void AddComponent( JsonObject obj, JsonObject newComponent )

 //Removes a component by a type from a JsonObject
 public void RemoveComponentByType( JsonObject obj, Type type )

 //Remove an object from the scene
 public void RemoveObject( JsonNode obj )

 //Loads the custom scene
 public void LoadScene();
}

Example

public void LoadScene()
{
 var customScene = new CustomScene( sceneFile );
 if ( customScene.GetAllObjectsByType( typeof( SkinnedModelRenderer ) ).Count() == 0 )
 {
 customScene.CreateObject( new GameObject() );
 }

 customScene.LoadScene();
}



## More by kicks

| Package | Ident | Players | Favorites | Upvotes | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Opium Postprocess | nolankicks.opiumpostprocess | 0 | 5 | 5 | 65% | https://sbox.watch/libraries/nolankicks/opiumpostprocess.md |
| Screen Shot Library | nolankicks.screenshotlibrary | 0 | 3 | 2 | 43% | https://sbox.watch/libraries/nolankicks/screenshotlibrary.md |
| No Clip Library | nolankicks.noclip | 0 | 3 | 0 | -- | https://sbox.watch/libraries/nolankicks/noclip.md |
| Websocket Tools | nolankicks.websocket_tools | 0 | 2 | 2 | 43% | https://sbox.watch/libraries/nolankicks/websocket_tools.md |
| Kicks' Component Collection | nolankicks.kickscomponents | 0 | 1 | 0 | -- | https://sbox.watch/libraries/nolankicks/kickscomponents.md |
