Question Prefab Constructor¶
The concept behind this prefab type is to have the user make a decision. This script should be attached to the root of the question prefab. This script handles user’s interaction with the answers given to the question.
Furthermore, this constructor manages audio playbacks for the selected answers.
Variable Name |
Type |
Description |
---|---|---|
Correct |
Audio Clip |
Set the audio clip that will be played when user’s answer is correct. |
Wrong |
Audio Clip |
Set the audio clip that will be played when user’s answer is wrong. |
Note
Each answer prefab needs to have attached the Question Trigger Collider script.
Question Trigger Collider Script¶
This script must be attached manually on the answer gameObject. This component declares the prefab as an answer to the question. This also defines if the answer is correct or not.