Skip to content

Game.Prefabs.SlaveAreaInfo

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

Type: class

Base: System.Object

Summary:
A small serializable container class used to reference an AreaPrefab. Marked with [Serializable], this class is intended to be embedded in other data structures or prefabs to store a link to an AreaPrefab instance (for example, as a "slave" or secondary area reference). It contains a single public field that holds the referenced AreaPrefab.


Fields

  • public AreaPrefab m_Area
    Holds a reference to an AreaPrefab. This field is public and will be serialized by Unity's serializer when instances of this class are serialized (for example, when part of a prefab or saved data). Use this to assign or retrieve the associated AreaPrefab.

Properties

  • None. This type exposes its data via the public field(s) only.

Constructors

  • public SlaveAreaInfo()
    Default, parameterless constructor (compiler-generated). Creates an instance with the m_Area field initialized to null. Assign the m_Area field after construction or use object initializer syntax.

Methods

  • None. This class provides no behavior beyond holding the AreaPrefab reference.

Usage Example

// create and assign
var slaveInfo = new Game.Prefabs.SlaveAreaInfo();
slaveInfo.m_Area = someAreaPrefab;

// or using object initializer
var slaveInfo2 = new Game.Prefabs.SlaveAreaInfo { m_Area = someAreaPrefab };

Additional notes: - Because the class is marked [Serializable], Unity's serialization system (used by Cities: Skylines 2) will include this type when it appears as a field on MonoBehaviours, ScriptableObjects, or other serializable data containers. - Ensure AreaPrefab is the correct type from the game's Prefabs API; null checks are recommended before using m_Area at runtime.