Skip to content

Game.Prefabs.ExpenseSourceInfo

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: class

Base: System.Object

Summary:
Serializable data container used to associate a visual color with an ExpenseSource identifier. Typically used in prefab or UI-related data to indicate which expense category a given prefab belongs to and what color should represent that category in overlays, lists, or editor tooling. The ExpenseSource type comes from the Game.City namespace (likely an enum or small value-type representing expense categories).


Fields

  • public UnityEngine.Color m_Color
    A Unity color value that represents the visual color for this expense source (used in UI, overlays, legends, etc.).

  • public Game.City.ExpenseSource m_ExpenseSource
    Reference to the ExpenseSource (from Game.City). This links the color to a specific expense category or identifier used by the game's economy/expense systems.

Properties

  • This class defines no public properties. It only exposes the two public fields above and relies on default serialization.

Constructors

  • public ExpenseSourceInfo()
    Default parameterless constructor (generated by the compiler). Instances are typically created/serialized by Unity (inspector, ScriptableObjects, prefab data) rather than constructed manually at runtime, though you can instantiate it in code.

Methods

  • This class declares no methods. It is a plain data holder (POCO) intended for serialization.

Usage Example

// Example: used inside a ScriptableObject or prefab data container
[CreateAssetMenu(menuName = "Game/ExpenseSourcePalette")]
public class ExpenseSourcePalette : ScriptableObject
{
    public ExpenseSourceInfo[] m_ExpenseSources;
}

// Example: instantiate in code (if needed)
var info = new ExpenseSourceInfo
{
    m_Color = Color.red,
    // Set an appropriate ExpenseSource value — replace 'SomeExpense' with a real enum/member
    m_ExpenseSource = Game.City.ExpenseSource.SomeExpense
};