Table of Contents

Class OptionalAttribute

Namespace
KeenEyes
Assembly
KeenEyes.Abstractions.dll

Marks a field as optional.

[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
[ExcludeFromCodeCoverage]
public sealed class OptionalAttribute : Attribute
Inheritance
OptionalAttribute
Inherited Members

Remarks

When used in query structs, the component will be default if not present on the entity.

When used in bundle structs, the field must be a nullable type and will only be added to entities if it has a value (is not null).