Data transfer between Layers - Katsuya100/SceneLayer-Trial GitHub Wiki

This section describes how to transfer data on Transition between Layers.
First, connect the Layers you want to pass data to with a Transition.
image

Layer should be custom LayerBehaviour.
image

Set the LayerOutputAttribute to the member of the LayerBehaviour to which you want to send data.

[LayerOutput]
int _output;

Set the LayerInputAttribute to a member of the LayerBehaviour that will receive the data.

[LayerInput]
int _input;

Select Transition and open the inspector.
Open [Out/In Mapping] to see a menu of value mappings.
image

Click the left terminal (Output) and connect it to the right terminal (Input).
image

Then the value of _output will be automatically transferred to _input when Transition is executed.