Game.Citizens.TravelPurposeInEditor
Assembly: Assembly-CSharp (game assembly)
Namespace: Game.Citizens
Type: struct (public)
Base: System.ValueType
Summary:
A small serializable value type used by the editor to represent a citizen travel purpose and associated metadata. This struct is marked with [Serializable] so it can be stored/edited in Unity editor data structures. Typical uses are in editor tooling or data containers that describe why a citizen is traveling and any extra integer or resource data associated with that purpose.
Fields
-
public Purpose m_Purpose
Represents the travel purpose (likely an enum such as commute, shopping, leisure, etc.). Determines the high-level reason for the trip. -
public int m_Data
An integer slot for purpose-specific metadata. Its meaning depends on m_Purpose (for example an index, count, or sub-type id). -
public ResourceInEditor m_Resource
Holds a ResourceInEditor value associated with this travel purpose (e.g., a resource being transported, consumed, or required). ResourceInEditor is an editor-side representation from Game.Economy.
Properties
- This struct does not declare any C# properties; it exposes its data via public fields.
Constructors
public TravelPurposeInEditor()
As a value type, it has the default parameterless constructor that initializes m_Purpose to its default enum value, m_Data to 0, and m_Resource to its default (typically null/default struct). No explicit constructor is defined in the source.
Methods
- This type does not declare any methods.
Usage Example
// Example: create and populate a TravelPurposeInEditor in editor code
TravelPurposeInEditor travel = new TravelPurposeInEditor
{
m_Purpose = Purpose.Shopping, // example enum value
m_Data = 2, // purpose-specific data
m_Resource = new ResourceInEditor { /* set resource fields as needed */ }
};
// Use travel in editor data structures, serialization, or previews.
Notes: - The struct is intended for editor usage (as suggested by the name). Interpret m_Data and m_Resource according to the context where TravelPurposeInEditor is used. - Ensure the matching Purpose enum and ResourceInEditor type definitions are available from the game's assemblies (Game.Economy or Game.Citizens).