Table of Contents

Class GameSettings

Namespace
Core
Assembly
Core.dll

ScriptableObject configuration for game initialization and data loading. Access via GameSettings.Instance after initialization.

[CreateAssetMenu(fileName = "GameSettings", menuName = "Archon/Game Settings", order = 1)]
public class GameSettings : ScriptableObject
Inheritance
object
GameSettings

Fields

AutoUpdateBorders

[Header("Map Rendering")]
[Tooltip("Automatically update borders when ownership changes")]
public bool AutoUpdateBorders

Field Value

bool

AutoUpdateMapModeTextures

[Tooltip("Automatically update map mode textures")]
public bool AutoUpdateMapModeTextures

Field Value

bool

EnableDataValidation

[Tooltip("Enable detailed validation of loaded data")]
public bool EnableDataValidation

Field Value

bool

EnableMemoryLeakDetection

[Header("Development Options")]
[Tooltip("Enable memory leak detection")]
public bool EnableMemoryLeakDetection

Field Value

bool

EnableParallelLoading

[Header("Loading Configuration")]
[Tooltip("Enable parallel loading where possible")]
public bool EnableParallelLoading

Field Value

bool

LogLevel

[Header("Logging")]
[Tooltip("Global logging verbosity level for all systems")]
public LogLevel LogLevel

Field Value

LogLevel

RetryAttempts

[Tooltip("Retry failed operations this many times")]
[Range(0, 5)]
public int RetryAttempts

Field Value

int

ShowDetailedErrors

[Tooltip("Show detailed error messages to user")]
public bool ShowDetailedErrors

Field Value

bool

SkipCacheWarming

[Tooltip("Skip cache warming for faster iteration")]
public bool SkipCacheWarming

Field Value

bool

TextureUpdateBatchDelay

[Tooltip("Delay between batched texture updates (seconds)")]
[Range(0.05, 1)]
public float TextureUpdateBatchDelay

Field Value

float

UseGracefulDegradation

[Header("Error Handling")]
[Tooltip("Continue loading with defaults if non-critical files are missing")]
public bool UseGracefulDegradation

Field Value

bool

Properties

DataDirectory

Gets the correct data directory path based on whether we're in Editor or build. In Editor: Uses editorDataDirectory (Assets/Archon-Engine/Template-Data) In Build: Uses StreamingAssets/Data

public string DataDirectory { get; }

Property Value

string

Instance

Static instance for easy access from anywhere. Set automatically when EngineInitializer loads settings.

public static GameSettings Instance { get; }

Property Value

GameSettings

Methods

CreateDefault()

Create default settings for testing

public static GameSettings CreateDefault()

Returns

GameSettings

LogConfiguration()

Log current configuration

public void LogConfiguration()

RegisterAsActive()

Register this settings instance as the active one. Called by EngineInitializer during initialization.

public void RegisterAsActive()

ShouldLog(LogLevel)

Check if logging is enabled at the specified level.

public bool ShouldLog(LogLevel level)

Parameters

level LogLevel

Returns

bool

ValidatePaths()

Validate that all required paths exist and are accessible

public GameSettings.ValidationResult ValidatePaths()

Returns

GameSettings.ValidationResult