Visual Scripting
In Meadow you need to use visual scripting for your experience logic. There are plenty of great tutorials online to give you an introduction to visual scripting. Here are two to get you started:
Meadow specific visual scripting events
Meadow has a few specific events related to functions in the app that you can make use of in your experiences. Many are related to specific features covered in other parts of the manual, but here are a few general ones:
OnContentInitialized // OnExperienceInitialized
This event is triggered when the experience is initialized and ready for use. It is recommended to initiate your experience in this event rather than OnStart to avoid conflicts with the initialization processes of Meadow and the AR subsystems, which occur during OnStart.
Parameters:
bool: Indicates whether the initialization was successful (true) or not (false).
ToggleARUI
This event is triggered when the user toggles the AR user interface. It can be utilized to pause the experience or display a message to the user.
Parameters:
bool: Represents the state of the AR UI;trueif the UI is open,falseotherwise.
UserCaptureCreated
This event is triggered following a user action of taking a picture or recording a video using Meadow’s integrated capture functionality. It provides information about the type of capture performed by the user, allowing for appropriate handling of the captured media.
Parameters:
CaptureType: Specifies the capture type, which can beCaptureType.Photofor photographs orCaptureType.Videofor videos, enabling tailored responses to different capture actions.
RepositionStart and RepositionEnd
These event is triggered when the positioning system has new information and repositions your experience accordingly. In most cases this is imperceptible to the user.