About Samples - Katsuya100/SceneLayer-Trial GitHub Wiki



These samples are a brief introduction to the functions of SceneLayer.
Tutorials are provided for each sample.
You can try out what functions are available by actually operating the samples.

Basic Operation

Sample Structure

The following folder structure is unified for each sample.

  • 0x_SampleName
    • Resources
    • SceneLayerProject(SceneLayer Project Folder.)
      • Editor
        • SceneLayerProject.asset(SceneLayer project file for editor.)
        • SceneLayerThumbnail.asset(Thumbnail data.)
      • Runtime
        • Entry.asset(Entry point data of SceneLayer.)
    • Scenes
    • Scripts
    • xxxxSample.unity(Sample start scene.)


Sample Verification Procedure

  1. Open the folder of the sample you want to display.
  2. Open the Sample start scene (see above)
  3. Click on the SceneLayer project file for the editor (see above).
  4. Select Open Scene Layer Editor from Inspector.

The SceneLayerEditor can be used to check the transition state of the scene and the loading state.

You can check the operation in Play mode or Edit the diagram according to the official documentation.
For detailed instructions, please refer to "Creating Transition Diagrams" in the official documentation.

Sample Explanation


First, we will learn how to display a scene.
This is a sample that dynamically loads a scene or Prefab.


Click on "Layer" and you will see that two Loaders are attached.
Let's replace them with other scenes and Prefab to see how they work.


This is a sample of transition processing.
A transition from SceneA to SceneB is written.


Let's make it possible to transition from SceneB to SceneA as well.
To perform transitions with Trigger, we need to use the Trigger.Set([event name]) function.


this is a sample for creating a child layer.


Create a new layer directly under [Root] and
Let's write a transition from the Parent layer.
When you leave the Parent layer, you will see that all child layers are released.


This is the process of customizing Behaviour.

  • Transition that automatically transitions when a password is entered
  • Loader to play SE

which plays a Transition SE that automatically transitions when a password is entered.


We have a custom Root layer.
Let's write a fade-out/in process and see how it works.


This is an example of a use case in game creation.
No challenges are provided for this sample.
Feel free to modify it and use it to verify the behavior.

About images, animations and other materials

Unity assets are used in 99_GameSample.
© Unity Technologies Japan/UCL

About sound materials

Material sounds distributed by OtoLogic are used.
License: CC BY 4.0

If you want to use the full version of SceneLayer

  1. delete com.katuusagi.scenelayer from [Windows > PackageManager].
  2. Import the commercial version of SceneLayer.
  3. Right-click on Assets in the Project Browser.
  4. Execute [SceneLayer > Repair GUID].