Toggles visibility of the VR menu / VR back button.
By default this button is enabled during VR mode.
Toggles visibility of the Scene navigation at the bottom of the screen.
Displays a panel with one question and up to four answers_.
At least two answers must be defined.
Example
GUI.HUD.showChoicePanel({
question: 'This is your question.',
answer1: 'First answer.',
answer2: 'Second answer.',
onAnswer: answerIndex => {
Debug.log(`Answer ${answerIndex} selected!`)
}
})
Displays a panel with title text, body text and an image via id
.
text
and title
must be defined.
Example
GUI.HUD.showInfoPanel({
title: 'This is the title',
image: 'yourImageID',
text: 'This is the body text.',
onHide: () => Debug.log('Panel closed.'),
})
panel options
created panel.
Displays a panel with one question and up to four answers, one of which is correct. At least two answers and the correct answer must be defined.
Example
GUI.HUD.showQuizPanel({
question: 'This is your quiz question.',
answer1: 'Correct answer.',
answer2: 'Wrong answer.',
correctAnswer: 1,
onCorrect: () => Debug.log('Correct answer selected.'),
onWrong: () => Debug.log('Wrong answer selected.')
})
panel options.
Displays a dialog that plays an embedded YouTube video.
YouTube video URL
Controls UI elements used while a Scene is played.