Assets/_MolcaSDK/_VR/Scripts/Scenario/Scoring/ScoringConfig.cs
Aggregation layers
ScoringConfig instances are used at step, activity, and scenario levels:
See Step scoring auxiliary, Activity scoring, and Scenario scoring.
ScoringType reference
Enum values and behavior matchScoringConfig.CalculateScore(float timeTaken, float accuracy = 1f) in ScoringConfig.cs. After the switch, the result is multiplied by scoreMultiplier; if allowNegativeScore is false, the final score is clamped to ≥ 0.
IsTimeBased() is true only for TimeBonus, TimePenalty, and Countdown (drives StepScoringAuxiliary OnStepUpdate refresh).
Shared tuning (all types except None)
GetMaxPossibleScore() (UI caps & normalization)
Implementation detail
Prefer callingCalculateScore / GetMaxPossibleScore on ScoringConfig rather than duplicating formulas in gameplay code. StepScoringAuxiliary sets accuracy for Binary / Accuracy via SetCorrect, SetIncorrect, SetAccuracy, SetAccuracyPercent before finalize — see Step scoring auxiliary.
When to use
EmbedScoringConfig (serialized class, not necessarily a standalone asset) wherever scoring is configured: StepScoringAuxiliary, ActivityScoring, ScenarioScoring. Choose None when the layer should not contribute numeric score but you still want a placeholder in the Inspector.
Troubleshooting
- Scores always zero — Type may be None; or time-based config has
maxPoints/ windows set so the formula yields 0 at currenttimeTaken/accuracy. - Binary feels inverted — Accuracy is 0–1: use
StepScoringAuxiliary.SetCorrect/SetIncorrect(orSetResult(bool)) soCalculateScoretreats correct as 0.5 and above and incorrect below 0.5. - Unexpected negatives — Enable
allowNegativeScoreor raiseminPoints/ adjust TimePenalty rate; final value is still multiplied byscoreMultiplier.
Related
- Recipe: Add scoring to VR activities — step-by-step guide for configuring scoring in VR training activities
Unity Editor
Embedded ScoringConfig on StepScoringAuxiliary or standalone asset if you use ScriptableObject variants.

ScoringConfig fields