Game.Prefabs.IncomeSourceInfo
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: class
Base: System.Object
Summary:
A simple serializable data container used by prefabs to describe an income source for game systems (e.g., tax/earnings categories). Contains a color used for visualization and an IncomeSource reference/identifier from the Game.City namespace. Marked with Unity's [Serializable] so instances can be serialized and shown/edited in the Unity inspector when used as part of other serializable objects.
Fields
-
public UnityEngine.Color m_Color
A Unity color used to represent this income source visually (for UI, overlays, legend, etc.). Public and serializable so it appears in the inspector. -
public Game.City.IncomeSource m_IncomeSource
The income source identifier (type or enum) defined in the Game.City namespace. Represents which income category this entry refers to. Public and serializable.
Properties
- This class does not declare any C# properties. It only exposes public fields.
Constructors
public IncomeSourceInfo()
The implicit default constructor. No custom construction logic is defined in the class; instances are typically created and initialized in code or via Unity's serialization when used as part of a prefab/asset.
Methods
- This class does not declare any methods.
Usage Example
using UnityEngine;
using Game.Prefabs;
using Game.City;
// Create and initialize manually
var info = new IncomeSourceInfo();
info.m_Color = Color.green;
info.m_IncomeSource = IncomeSource.Taxes; // example; actual enum/value depends on Game.City.IncomeSource
// Typical usage: part of a larger serializable prefab class that Unity will show in the inspector
[Serializable]
public class MyPrefabData
{
public IncomeSourceInfo[] incomeSources;
}
Additional notes: - Because the class is marked [Serializable] and uses public fields, Unity will serialize and display instances inside other serialized objects (ScriptableObjects, MonoBehaviours, prefab data). - The exact members/values of Game.City.IncomeSource are defined elsewhere (Game.City namespace) — treat m_IncomeSource as the link to that type.