Overview of All Prefabs¶
Imports¶
Make sure you import the Tobii.XR and PicoXR SDK packages
List¶
gameSetupPrefab¶
a prefab which is partly directed by the child, partly by the researchers. (do we want this to be decided upfront?)
Also the caregiver can be shaped via this prefab? (if the child gets to form the caregiver)
stateManagerPrefab¶
- keeps track where we are in a trial:
preTrial
:Trial
endTrial
trialListPrefab:¶
- a list of all upcoming trials
- each trial is calculated according to
public int contingencyLevel
to have a distribution of good and bad trials. - the
trialListPrefab
dictates the caregiver out of which lists she should be giving a response if activated. - the
trialListPrefab
decides if the upcoming trial will be- easy/difficult for competition (and level of NPCs)
- exclusion/normal game for ostracity
- each trial is calculated according to
- keeps track of current trial via
private int currentTrial
- if a
nextTrial
signal is given,currentTrial
goes up if not last trial- we store the important values in 'playerprefs': playerprefs or via a singleton: singleton
- otherwise we show an endImage
caregiverPrefab:¶
- a model with animation rigging
- public bool
canBeActivated
: makes it possible to activate the caregiver - if
practicalSetup
&preTrial
: caregiverscanBeActivated
is set to True untilstartTrial
is activated ORhasBeenActivated
is set to true - if
emotionalSetup
&postTrial
: caregiverscanBeActivated
is set to True untilnextTrial
is activated ORhasBeenActivated
is set to true - public bool
isActivated
: - when activated the caregiver reads a random line of one of both responseLists according to the
contingencyMode
- also private bool
hasBeenActivated
gets set to true UNTILnextTrial
signal is given. - two versions: practical & emotional:
- four differing lists of possible responses.
responseListPrefab¶
- we need four lists:
- emotional responses:
- supportive
- non-supportive
- practical responses:
- good advice
- bad advice
- these lists can be csv format, so they can be maintained outside of unity
- we have a function returnResponse(supportType, goodOrBadResponse) which returns a random string from the corresponding list.
scoreBoardPrefab¶
- only necessary in competition
- has three variables: one for each player
- if
endTrial
signal is given the score is updated for each player - An animation is shown indicating the ranking of the child.
caregiverScoringPrefab¶
- a 2D image being presented in which the child must indicate on a line how much (s)he trusts the caregiver.
- the score is saved via the saveMetricsPrefab
saveMetricsPrefab¶
a prefab which has one/multiple files open to write to them
Text Balloon¶
- a 3D balloon, oriented towards the player
- should show text very clearly
- show some particles to draw attention?
Ball¶
the ball has a state machine:
- being grabbed
- the ball is interactable by a player
- the ball changes to this state when in a certain radius of the player and a raycast hits
- being attached
- the ball is parented to a player's hand
- the ball changes to this state when collided with the players hand
- the player does not look anymore to the ball itself. (if the ball's parent is itself or a child of itselves, don't look)
- being thrown
- by an NPC: via slerp
- after x time, at y speed
- by the player: via XR rig
- with assistance if needed (boolean or floating range of support)
- by an NPC: via slerp
- being idle
- can be attracted if close enough?
- should be destroyed and respawn in a players hand after x time
- a ball gets in the idle state if the child did throw the ball and it's not close enough for the other players to attract the ball.
Login Screen Prefab¶
When the child enters the game for the first time, we need to show a text block in which all steps are explained.
chooseTeamPrefab¶
child gets to see in-game menu to choose team from, this is a screen that is fixed in position, the child can look away from it towards the caregiver.
if this is shown, no players should be on the field.
Sound from Zapsplat.com
Issues¶
when parenting a ball, strange things happen. I think it's primarily because the ball was moving before and I've parented it with keeping the location. Yet this does probably NOT stop the movement due to the mass of the object? therefore the ball can be at large distances instead of attached to the hand (as intended)
Project settings ==> Player ==> Scripting Define Symbols ==> DEFINE_NAME ==> #if DEFINE_NAME #endif possible!
set all environment things to a layer and lock it
[System.Serializable] boven een class maakt dat je niet monobehavior component kan scripten
preferences ==> general ==> Script changes while playing
Questions¶
data bijhouden: 1 grote file of liever per topic aparte file, in 1 folder per kind?
TODO: UI scherm aan de zijkant waarop je van scene kunt switchen?
TODO Contingentie Aanpassen¶
statemanager: nu emotional vs practical , maar ook al competition vs ostracity?
contingentie: wat mama zegt en of het goed of fout is
isGoodTrial mag random zijn
maar isGoodResponse is gelinkt aan het advies hier op
tekst: zwevend in ruimte bij zorgfiguurn + pijltje naar de mond
licht laten uitgaan bij eindigen?
sporthall: achtergrond extra spelers + geluiden
supporters aan de zijkant?
status: checken of alle prefabs goed staan in beide scenes, kunnen we switchen?