Skip to content

10. Configuration

File Assets/sus.config.json:

json
{
  "SharqDirectory": "Assets/MyUI",
  "GeneratedDirectory": "Assets/MyUI/Generated",
  "ResourcesDirectory": "Assets/MyUI/Generated/Resources/SusRuntime",
  "EnableValidation": true,
  "StrictVForKey": true,
  "LogGeneratedFiles": true,
  "HotReloadStatePreserve": true,
  "logLevel": "Warn"
}

Keep ResourcesDirectory inside GeneratedDirectory (the Resources mirror is written under the generated output). Mismatched roots (e.g. .../gen + .../Generated/Resources) split the output into two trees.

FieldDefaultMeaning
SharqDirectoryAssets/SusUIWhere .sharq sources live
GeneratedDirectoryAssets/SusUI/GeneratedOutput for .g.cs / .g.uss
ResourcesDirectory…/Generated/Resources/SusRuntimeCompiler-synced runtime Resources folder (under GeneratedDirectory)
EnableValidationtrueRun SharqValidator
StrictVForKeytrueWarn if v-for lacks :key
LogGeneratedFilestrueLog generation to the console
HotReloadStatePreservetrueSnapshot Prop<T> across domain reload while Playing
logLevelWarnRuntime minimum for SusLog (Error / Warn / Info / Verbose, case-insensitive). Audits and other diagnostics stay silent until Verbose. See 11-api-reference.

logLevel is read at runtime from Assets/sus.config.json on first SusLog use (player-safe; not the Editor-only config UI). Code can override it with SusApp.UseLogLevel(...) / SusLog.Level. Scripting define SUS_VERBOSE_LOGS floors the level at Verbose and cannot be lowered by config or UseLogLevel.

There is no EnableHashCaching field — incremental compilation uses the compiler’s own cache.