Skip to content

Game.Prefabs.EducationLevelInfo

Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs

Type: Class

Base: System.Object

Summary:
Serializable container used to associate a citizen education level with a color. Typically used by prefabs, UI elements, or data assets to define how different education levels are presented (for example, legend colors in charts or overlays). The class is marked with Unity's [Serializable] attribute and uses public fields so instances can be edited in the Unity Inspector and serialized by Unity.


Fields

  • public UnityEngine.Color m_Color
    Color used to represent the associated education level (e.g., shown in UI legends, overlays, or prefab visuals). Public so it is serialized and editable in the Unity Inspector.

  • public Game.Citizens.CitizenEducationLevel m_EducationLevel
    Enumeration value indicating which citizen education level this entry represents. The enum (Game.Citizens.CitizenEducationLevel) defines the discrete education tiers used by the game; this field maps one of those tiers to the color above.

Properties

This class does not declare any properties. It uses public fields for Unity serialization and inspector editing.

Constructors

  • public EducationLevelInfo()
    Default parameterless constructor provided by the runtime. Unity serialization and typical usage rely on this default constructor; no custom initialization logic is defined in the class.

Methods

This class does not declare any methods. It functions as a plain data container (POCO) for pairing a color with an education level.

Usage Example

using Game.Prefabs;
using Game.Citizens;
using UnityEngine;

public class Example
{
    void CreateInfo()
    {
        // Create and initialize an EducationLevelInfo instance.
        var info = new EducationLevelInfo
        {
            m_Color = Color.cyan,
            // Set to the desired enum member. Replace 'Primary' with an actual value from CitizenEducationLevel.
            m_EducationLevel = CitizenEducationLevel.Primary
        };

        // Use `info` in your prefab data, UI legend, or other mod logic.
    }
}