-
Notifications
You must be signed in to change notification settings - Fork 0
Shorthands
Luka Horvat edited this page Nov 11, 2013
·
1 revision
Shorthands are a handy way to quickly access components in an entity. When making a new entity subclass, you can use shorthands like this
[Shorthand]
public TransformComponent Transform { get; set; }
The property will magically always have the value of the current TransformComponent attached to the entity that has it. They they have some restrictions. You can only use them on entities and you can only use them with automatic properties. They will work with normal properties as long as the getter returns the last set value. There are no restrictions to the accessibility modifier.