Luna Replay allows you to capture a single piece of gameplay footage, and create unlimited variations by changing anything visual within the game without needing to re-record footage.
When preparing your game in Unity, you are able to apply the
LunaPlaygroundField attribute to any serializable field (i.e. public fields of MonoBehaviours and ScriptableObjects or fields marked with SerializeField attribute) and it will be surfaced in the playable editor in Luna Playground.
This attribute will then surface these game variables when creating your replays, either in the Unity editor, or Luna Playground.
- Apply the Luna
LunaPlaygroundFieldattribute to your game variables
- Implement the
ISerializationCallbackReceiverinterface on a
MonoBehaviouror 'ScriptableObject' where the variables are declared
This Luna attribute should be used for the scriptable game objects you wish to edit from Luna Playground.
- Supported Types
When applying the
LunaPlaygroundField attribute, you may use the
#if UNITY_LUNA_FIELD … #endif clause to avoid compilation errors in the editor.
For each Playground Field, you can specify the title, order and section.
[LunaPlaygroundField("Field title", 0, "Group title")]
- Field title: The name of the field in Playground i.e. "Tutorial Message"
- Field order: The order of the field in Playground
- Field section: The name of the group to which the field belongs i.e. "Tutorial"
LunaPlaygroundSection attribute can be applied to a class in order to add all Luna Fields and Assets into the same Playground section, making it easier to organise your fields in Luna Playground.