Quick Start - Katsuya100/SceneLayer-Trial GitHub Wiki
Summary
Here is a simple introduction for those new to SceneLayer
.
The goal of the quick start is to be able to transition from the title to another scene in Play mode.
Steps
Create SceneLayerProject
- Create a folder anywhere on Project.
- Decide on a folder name.(Example:
SceneLayerProject
)
- Select [Right-click > Create > SceneLayer > Project] in the folder you created.
Edit SceneLayer
- Select
SceneLayerProject/Editor/SceneLayerProject
on Project.
- Click the
Open Scene Layer Editor
button on the Inspector.
- SceneLayerEditor was opened.
Create transition diagrams
- Select [Right-click > Add Layer] on the SceneLayerEditor.
Layer
was created.
- Click on the
Layer
created and give it any name on Inspector.
Here, we useTitle
as an example.
- Follow the same procedure to create another
Layer
and give it an arbitrary name on Inspector.
Here we useScreenSample
as an example.
- Select [Right-click > Create Transition] on the
Title
Layer.
- Click on
ScreenSample
Layer to connectTransiton
.
- Click on the
Transition
created in step 6 and enterTap
in theTrigger
property on Inspector.
Create Scene
- Create two arbitrary scenes.
Here we useTitle.unity
ScreenSample.unity
as an example.
- Place uGUI buttons on the Hierarchy of
Title.unity
.
- Add a
TriggerButton
component to a GameObject that has aButton
component.
- Enter
Tap
in theTrigger
property.
- Put a Renderer in
ScreenSample.unity
for clarity.
- Add
Title.unity
ScreenSample.unity
in BuildSettings.
Load Scene
- Click on
Title
Layer on theScene Layer Editor
. - Click [+] on Inspector to create a
SceneLoader
.
- Specify
Title.unity
for theScene
property.
- Specify
ScreenSample.unity
for theScreenSample
Layer as well.
Runtime Initialization
- Create a startup scene.
Here we useRoot.unity
as an example.
- Open
Root.unity
, create a GameObject and give it an arbitrary name. (Example: SceneLayerController)
- Add a
SceneLayerController
component to the GameObject you created.
- Add
SceneLayerProject/Runtime/Entry
to Entry on Inspector.
Playmode Test
Put Root.unity
in Play mode and you will see that the Title.unity
you just created is loaded.
Click the Tap
button to transition from Title.unity
to ScreenSample.unity
.
From here, various scene changes can be realized by creating Layers
and Transitions
.
For more detailed operations, see How to operate SceneLayerEditor.