Skip to main content

OpenTD reference 2026 R1

Class UnitsDefData

Last update: 09.03.2026

Namespace: OpenTD
Assembly: OpenTD.dll

UnitsDefData is used to create units with arbitrary combinations of dimensions.

[DataContract]
public class UnitsDefData : IEquatable<UnitsDefData>

Inheritance

object ← UnitsDefData

Implements

IEquatable<UnitsDefData>

Inherited Members

object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Constructors

UnitsDefData()

Initializes a new instance of the class.

public UnitsDefData()

UnitsDefData(UnitsDefData)

Copy constructor.

public UnitsDefData(UnitsDefData source)

Parameters

source UnitsDefData

Properties

multiUnitsTypes

[DataMember]
public List<int> multiUnitsTypes { get; set; }

Property Value

List<int>

multiUnitsUnits

[DataMember]
public List<int> multiUnitsUnits { get; set; }

Property Value

List<int>

numer

[DataMember]
public List<bool> numer { get; set; }

Property Value

List<bool>

Methods

Equals(UnitsDefData)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(UnitsDefData x)

Parameters

x UnitsDefData

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator ==(UnitsDefData, UnitsDefData)

public static bool operator ==(UnitsDefData x1, UnitsDefData x2)

Parameters

x1 UnitsDefData

x2 UnitsDefData

Returns

bool

operator !=(UnitsDefData, UnitsDefData)

public static bool operator !=(UnitsDefData x1, UnitsDefData x2)

Parameters

x1 UnitsDefData

x2 UnitsDefData

Returns

bool

Connect with Ansys