How to operate SceneLayerEditor - Katsuya100/SceneLayer-Trial GitHub Wiki
Creating a SceneLayer Project
To use SceneLayer, first perform a setup in the editor.
This setup creates a project directory called SceneLayer Project
.
Steps
- Create a folder in any location under Assets. Name the folder as you like.
(Example:SceneLayerProject
, etc.)
- Right-click on the created folder and select
Right-click > Create > SceneLayer > Project
.
This folder will be the project folder for SceneLayer.
Runtime setup
Setup to use SceneLayer at runtime.
This setup places the controller in the initial startup scene.
Steps
- Create the initial startup scene.(Example:
GameSample.unity
) - Right-click on the Hierarchy
Right-click > Create Empty
. - Click on the GameObject you created.
- Select
Add Component > Scene Layer Controller
on Inspector.
- Drag and drop
[SceneLayer project folder]/Runtime/Entry
into the Entry property.
- Save the scene.
How to use the SceneLayerEditor
The SceneLayerEditor
is used to create scene transitions in SceneLayer.
This section lists and describes the functions of the SceneLayerEditor
.
How to open
- Select
[SceneLayer project folder]/Editor/SceneLayerProject
.
- Select
Open Scene Layer Editor
on Inspector.
- The
SceneLayerEditor
opens.
Right-click menu on the editor
Menu | Details |
---|---|
Add Layer | Add Layer .See Layer for details. |
Paste Layer | Duplicate and paste the copied Layer .See Right-click menu on the Layer for how to copy. |
Focus Running Layer | Play mode only. Focuses on the running Layer . |
Open Entry Scene | Open the scene to which the SceneLayer currently being edited is associated.To associate, follow the steps in Runtime setup. |
Layer
A Layer
is a unit of a single screen.
Its main role is to manage the game system and objects within a single screen.
Also, customizing a Layer makes it possible to implement game code.
Create Layer
- Select
Right Click > Add Layer
in an empty space in theSceneLayerEditor
.
- Node is created.
This node is the Layer
.
Creating Layer
creates a ScriptableObject on the Project.
This ScriptableObject is the entity of Layer
.
Right-click menu on the Layer
Menu | Details |
---|---|
Copy Layer | Copy Layer .Duplicate it using Paste Layer from the Right-click menu on the editor |
Remove Layer | Remove Layer . |
Create Transition | Create Transition .See Transition for details. |
Set Entry | Set as the first Layer to be executed. |
Edit Layer
Clicking Layer
selects the entity on the Project and brings up the editing window in Inspector.
Parameter | Details |
---|---|
Active | Active state of Layer .Unchecking disables Layer . |
Beheviour Type | Specify the type of Layer .Custom scripts can be specified.(See Customize Behaviour for details.) |
Name | Specify the name of the Layer . |
Preview Layer | Preview Layer .Features exclusive to the Pro Version.(See Preview scenes in Layer.(Pro Only) for details.) |
+ | Add a Loader .Use Loader to display objects on the screen.(See Create Loader for details.) |
Create child Layer
Double-click on Layer
to create a child layer.
You can return to the parent layer editing screen from the bar at the top of the SceneLayerEditor
.
Transition
A Transition
is a screen transition.
Connecting Layer
to Layer
by Transition
allows you to transition between Layers
.
This function allows you to change objects in the Hierarchy.
Create Transition
- Right-click on
Layer
on theSceneLayerEditor
and selectRight-Click > Create Transition
.
- Select another
Layer
. - Arrows connect between
Layers
.
This arrow is called Transition
.
Right-click menu on the Transition
Menu | Details |
---|---|
Disconnect Transition | Disconnect Transition . |
Edit Transition
Clicking Transition
selects the entity on the Project and brings up the editing window in Inspector.
Parameter | Details |
---|---|
Active | Active state of Transition .Unchecking disables Transition . |
Beheviour Type | Specify the type of Transition .Custom scripts can be specified.(See Customize Behaviour for details.) |
Out/In Mapping | Data transfer between Layers can be configured via Transition .(See Data transfer between Layers for details.) |
+ | Create a Transition with the same source/destination. |
- | Remove Transition . |
See Preset Behaviour for preset Transitions
such as Trigger
.
When you connect Transition from Any
Connecting Any
to Transition
will allow you to transition from all Layer
.
However, only one TransitionBehaviour
ScriptableObject is created.
Therefore, no matter which Layer
you transition from, you will always use the same Transition
.
Loader
The Loader
is the function that loads the assets.
It is responsible for Load
Instantiate
Destroy
Unload
.
Create Loader
- Select
Layer
on theSceneLayerEditor
. - Select the
+
button on the Inspector.
- More items on Inspector.
The item added here is called a Loader
.
When you create a Loader
, an entity ScriptableObject is created on the Project.
Right-click menu on the Loader
Menu | Details |
---|---|
Move Up | Move Loader up. |
Move Most Up | Move Loader to the top. |
Move Down | Move Loader down. |
Move Most Down | Move Loader to the bottom. |
Duplicate | Duplicate Loader . |
Loaderの編集
Parameter | Details |
---|---|
Beheviour Type | Specify the type of Loader .Custom scripts can be specified.(See Customize Behaviour for details.) |
Name | Specify the name of the Loader . |
Advanced Options | Higher-level options. |
See Preset Behaviour for preset Loaders
such as SceneLoader
.
Advanced Options
Parameter | Details |
---|---|
Receive Field | A variable can be specified to which the Instantiated object is recieved.(See Receive Loader instance events in Layer for details.) |
On Instantiated | A function can be specified to which the Instantiated object is recieved.(See Receive Loader instance events in Layer for details.) |
On Destroyed | Specify a function to receive the Destroyed Notification.(See Receive Loader instance events in Layer for details.) |
Load From | Specify which Layer to perform the Load on.Unloaded when transitioning to an unspecified Layer .(See Preload for details.) |
Load.Start | Specify the timing to start Load with a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Load.Wait For Complete | Specify the timing to wait for Load by a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Instantiate.Start | Specify the timing to start Instantiate with a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Instantiate.Wait For Complete | Specify the timing to wait for Instantiate by a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Destroy.Start | Specify the timing to start Destroy with a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Destroy.Wait For Complete | Specify the timing to wait for Destroy by a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Unload.Start | Specify the timing to start Unload with a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Unload.Wait For Complete | Specify the timing to wait for Unload by a sequence event.(See Specify when to start and wait for Loader processing for details.) |
Dependence Loader | Available when there are multiple Loader .You can specify a dependent Loader .When a dependency is specified, the Loader waits until the dependent party completes. |