Skip to content

Game.UI.Editor.BuildingLotWidthField

Assembly: Assembly-CSharp
Namespace: Game.UI.Editor

Type: class

Base: BuildingLotFieldBase

Summary:
Specialized UI field factory used by the building lot editor to create a width input field. This class overrides the generic TryCreate behavior of BuildingLotFieldBase to force a horizontal layout for the created field. It is a thin convenience wrapper used by the editor to obtain a horizontally-arranged width field without repeating the horizontal flag at each call.


Fields

  • None
    This class does not declare any instance or static fields.

Properties

  • None
    No additional properties are declared on this type.

Constructors

  • public BuildingLotWidthField()
    This class relies on the implicit parameterless constructor generated by the compiler. No custom construction logic is defined.

Methods

  • public override FieldBuilder TryCreate(Type memberType, object[] attributes)
    Creates a FieldBuilder for the specified member type and attributes, forcing a horizontal layout. Internally it calls the base BuildingLotFieldBase.TryCreate overload with horizontal: true. Parameters:
  • memberType — the Type of the member the field is being created for (e.g., typeof(int) for a width integer).
  • attributes — array of attributes applied to the member that may influence field creation.
  • Returns a FieldBuilder instance (or null/appropriate fallback per base implementation) configured for a horizontal width field.

Usage Example

// Create a horizontal width field for an integer property (no extra attributes)
FieldBuilder widthFieldBuilder = new BuildingLotWidthField().TryCreate(typeof(int), new object[0]);

// widthFieldBuilder can then be used by the editor UI code to render the width input in horizontal layout.

Notes: - This class is intended for use within the Cities: Skylines 2 editor UI system and relies on the behavior provided by BuildingLotFieldBase.
- If you need a vertical layout or custom behavior, use BuildingLotFieldBase.TryCreate with explicit parameters or implement a custom field factory.