Table of Contents

Class CustomEnumDefinition

Namespace
DotTiled
Assembly
DotTiled.dll

Represents a custom enum definition in Tiled. Refer to the documentation of custom types to understand how they work.

public class CustomEnumDefinition : ICustomTypeDefinition
Inheritance
CustomEnumDefinition
Implements
Inherited Members

Properties

ID

The ID of the custom type.

public uint ID { get; set; }

Property Value

uint

Name

The name of the custom type.

public required string Name { get; set; }

Property Value

string

StorageType

The storage type of the custom enum.

public CustomEnumStorageType StorageType { get; set; }

Property Value

CustomEnumStorageType

ValueAsFlags

Whether the value should be treated as flags.

public bool ValueAsFlags { get; set; }

Property Value

bool

Values

The values of the custom enum.

public List<string> Values { get; set; }

Property Value

List<string>

Methods

FromEnum(Type)

Creates a custom enum definition from the specified enum type.

public static CustomEnumDefinition FromEnum(Type type)

Parameters

type Type

Returns

CustomEnumDefinition

FromEnum<T>()

Creates a custom enum definition from the specified enum type.

public static CustomEnumDefinition FromEnum<T>() where T : Enum

Returns

CustomEnumDefinition

Type Parameters

T