File:Documentation Index
Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
Use this file to discover all available pages before exploring further.
Assets/_MolcaSDK/_VR/Scripts/Scenario/Scoring/StepScoringAuxiliary.csAttached via: Step Auxiliaries list (VR step auxiliaries)
Role
Holds a ScoringConfig.OnStepBegin starts the timer; OnStepUpdate refreshes time-based configs via IsTimeBased(); OnStepCompleted / OnStepEnd call FinalizeScore() (idempotent).Score evaluation now includes an internal manual offset (
manualScoreOffset) added on top of ScoringConfig.CalculateScore(...), so external bonus/penalty adjustments persist into the finalized value.When
postScoreToSession is true, PostStepScoreAsync runs after resolve checks (ScenarioSessionManager, ScenarioActivity, ActivityData, org IDs from Scenario Data Config).
Code
AddBonusPoints mutates the internal manual offset until finalization. This supports positive bonus and negative penalty values, including when called via StepScoringBridge UnityEvents.For PointValue score type, this means final score is base point value + manual offset (not base score only).
GetMaxPossibleScore() delegates to ScoringConfig and does not automatically include runtime manual offsets.
Troubleshooting
- Session post warnings — Orgs and step IDs must exist in fetched content (
OrgScenarioId,org_activity_id,org_step_id); session must be active. MissingScenarioActivityon the sequence resolves to failed post. - Time score not moving — Only TimeBonus, TimePenalty, Countdown refresh during
OnStepUpdate; PointValue stays fixed until time still advances internalelapsedTimefor posting only. - PointValue final stays at base score — Ensure the bonus/penalty event is wired before completion (
StepScoringBridge.AddBonusPoints(float)), and verify it fires beforeFinalizeScore(). - Accuracy ignored — Call
SetAccuracy/SetCorrectbeforeFinalizeScorefor Binary / Accuracy types; defaultaccuracyValuestarts at 1.
Unity Editor
Step → Auxiliaries → StepScoringAuxiliary expanded.
