When I try to use the [Property(Name)] or [Setter(Name)] to create field accessors I get compilation errors. [Getter(Name)] works fine as well as the explicit syntax.
This code
import UnityEngine
class Blurg (MonoBehavior):
[Setter(Center)]
_center as Transform
causes the error
Assets/Player/Blurg.boo(28,6): BCE0064: No attribute with the name ‘Setter’ or ‘SetterAttribute’ was found (attribute names are case insensitive).
And this code
import UnityEngine
class Blurg (MonoBehavior):
[Property(Center)]
_center as Transform
causes these errors:
Assets/Player/Ship.boo(28,15): BCE0005: Unknown identifier: ‘Center’.
Assets/Player/Ship.boo(28,6): BCE0024: The type ‘UnityEngine.PropertyAttribute’ does not have a visible constructor that matches the argument list ‘(error)’.
I’m running Unity 4.3.1f1.
Update
Removing import UnityEngine fixes the problem however then I need to prefix many things with UnityEngine.. Not really considering this a solution.