Skip to content

Game.Prefabs.SchoolLevel

Assembly:
Assembly-CSharp (game's managed assembly)

Namespace: Game.Prefabs

Type:
enum

Base:
System.Enum (underlying type: System.Int32)

Summary:
Represents the classification levels for school prefabs used by the game to identify the educational tier of a building or service. Values start at 1 (rather than 0); the special value Outside is used to indicate an external or non-game-connected school level (e.g., services provided from outside the city). Note that the enum's underlying default value (0) is not defined in this enum and should be handled if encountered (it typically represents an uninitialized or invalid state).


Fields

  • Elementary = 1
    Represents an elementary school level (primary education). Typically used for basic education buildings and related service logic.

  • HighSchool
    Represents a high school level (secondary education). Higher than Elementary, lower than College.

  • College
    Represents a college level (post-secondary, non-university). Used for mid-tier higher education buildings.

  • University
    Represents a university level (highest tier of education). Used for advanced education buildings and effects.

  • Outside
    Indicates that the school level is provided or sourced from outside the current city (external connection) or otherwise not part of the standard in-city progression.

Properties

  • None (this is a plain enum type; no custom properties are defined)

Constructors

  • None (enums are value types with implicit construction; the default underlying value 0 is not one of the named members)

Notes: You can cast integer values to this enum and vice versa (e.g., (SchoolLevel)1 == SchoolLevel.Elementary). Be cautious when casting values that might be 0 or outside the defined range.

Methods

  • Inherited methods from System.Enum / System.ValueType / System.Object, for example:
  • ToString() : string
  • HasFlag(Enum) : bool
  • CompareTo(object) : int
  • GetHashCode() : int
  • GetTypeCode() : System.TypeCode

No custom methods are defined on this enum.

Usage Example

using Game.Prefabs;

public void AssignSchoolLevelExample()
{
    SchoolLevel level = SchoolLevel.HighSchool;

    switch (level)
    {
        case SchoolLevel.Elementary:
            // handle elementary
            break;
        case SchoolLevel.HighSchool:
            // handle high school
            break;
        case SchoolLevel.College:
        case SchoolLevel.University:
            // handle higher education
            break;
        case SchoolLevel.Outside:
            // handle external school source
            break;
        default:
            // handle undefined (e.g., 0) or unexpected values
            break;
    }

    // Casting from int:
    int raw = 3;
    SchoolLevel fromInt = (SchoolLevel)raw; // College
}