• This is a helper build macro for easily building classes with Hash values.

For example we can define a class like this:

@:build(defold.support.HashBuilder.build())
class MyProperties {
var zoom;
var speed;
var positionY = "position.y";
}

It will be modified by this macro to this:

class MyProperties {
public static final zoom(default,never) = Defold.hash("zoom");
public static final speed(default,never) = Defold.hash("speed");
public static final positionY(default,never) = Defold.hash("position.y");
}

This is useful, because hashes that are used often should be pre-computed and stored for better performance.

Go.get(url, "position.y"); // slow

Go.get(url, MyProperties.positionY); // faster

Static methods

staticbuild():Array<Field>