Class SceneTemplateAsset
Asset storing everything needed to instantiate a scene from a templated scene
Inherited Members
Namespace: UnityEditor.SceneTemplate
Assembly: solution.dll
Syntax
[Serializable]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.scene-template@latest/")]
[CreateAssetMenu(menuName = "Scene Template", order = 201)]
public class SceneTemplateAsset : ScriptableObject
Fields
Name | Description |
---|---|
addToDefaults | If this template is tagged as add to defaults, it will be put in the defaults list of the new scene dialog. |
dependencies | List of dependencies of the scene and what to do (Clone or Reference) with each dependency. |
description | Description of the template (can be long, displayed in multiline UI). |
preview | Preview/Icon of the template. |
templateName | Pretty name for the template asset. By default: the file name of the template |
templatePipeline | Script dering from ISceneTemplatePipeline allowing custom code to be executed on template instantiation. |
templateScene | Scene that will be copied when instantiating the template |
Properties
Name | Description |
---|---|
IsValid | Is the template valid? If not it wont be displayed in the New Scene Dialog. |
Methods
Name | Description |
---|---|
AddThumbnailToAsset(Texture2D) | Set the preview of the template and store it in the template asset itself. |
BindScene(SceneAsset) | Assign a new scene to the template and recompute all dependencies |
CreatePipeline() | Instantiate a SceneTemplatePipeline. This is done on each template instantiation. |
IsValidPipeline(MonoScript) | Validate if a given script contains a class deriving from ISceneTemplatePipeline |
UpdateDependencies() | Refresh all the dependencies of the template. |