库

s&box 库列表

Scene Loading Utility

nolankicks.sceneloadingutility

关于

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();
}

更多作品,作者: kicks

查看创作团队分析 →
01
Opium Postprocess 缩略图
Opium Postprocessnolankicks.opiumpostprocess

A Retro Console Shader

+024小时
5收藏
5好评
65%Terry 评分
02
Screen Shot Library 缩略图
Screen Shot Librarynolankicks.screenshotlibrary

A library that allows screenshotting of a scene

+024小时
3收藏
2好评
43%Terry 评分
03
No Clip Library 缩略图
No Clip Librarynolankicks.noclip

No summary provided.

+024小时
3收藏
0好评
--Terry 评分
04
Websocket Tools 缩略图
Websocket Toolsnolankicks.websocket_tools

A library that is designed to help simplify the process of interacting with Websockets

+024小时
2收藏
2好评
43%Terry 评分