Data transfer between Layers - Katsuya100/SceneLayer-Trial GitHub Wiki
This section describes how to transfer data on Transition between Layers.
First, connect the Layer
s you want to pass data to with a Transition
.
Layer should be custom LayerBehaviour
.
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.
Click the left terminal (Output) and connect it to the right terminal (Input).
Then the value of _output will be automatically transferred to _input when Transition is executed.