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

  1. Create a folder in any location under Assets. Name the folder as you like.
    (Example: SceneLayerProject, etc.)
    image
  2. Right-click on the created folder and select Right-click > Create > SceneLayer > Project.
    image

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

  1. Create the initial startup scene.(Example:GameSample.unity)
  2. Right-click on the Hierarchy Right-click > Create Empty.
  3. Click on the GameObject you created.
  4. Select Add Component > Scene Layer Controller on Inspector.
    image
  5. Drag and drop [SceneLayer project folder]/Runtime/Entry into the Entry property.
    image image
  6. 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

  1. Select [SceneLayer project folder]/Editor/SceneLayerProject.
    image
  2. Select Open Scene Layer Editor on Inspector.
    image
  3. The SceneLayerEditor opens.
    image

Right-click menu on the editor

image

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

  1. Select Right Click > Add Layer in an empty space in the SceneLayerEditor.
    image
  2. Node is created.
    image

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

image

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

image
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.
image

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

  1. Right-click on Layer on the SceneLayerEditor and select Right-Click > Create Transition.
    image
  2. Select another Layer.
  3. Arrows connect between Layers.
    image

This arrow is called Transition.

Right-click menu on the Transition

image

Menu Details
Disconnect Transition Disconnect Transition.

Edit Transition

image
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

image
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

  1. Select Layer on the SceneLayerEditor.
  2. Select the + button on the Inspector.
    image
  3. 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

image

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の編集

image

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

image

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.