Skip to content

Constant bindable

Konstantin Tomashevich edited this page Jun 17, 2017 · 1 revision

Usage

Parses next constant declaration. Example:

//@ASBindGen Constant
const Urho3D::StringHash DIPLOMACY_OFFER_PEACE ("DiplomactOfferPeace");

It reads DIPLOMACY_OFFER_PEACE constant of type Urho3D::StringHash.

Binding arguments

OverrideType

Overrides binding type. Example:

//@ASBindGen Constant OverrideType=NewConstantType...
const OldConstantType constant;

OverrideName

Overrides binding name. Example:

//@ASBindGen Constant ... OverrideName=NewConstantName
const ConstantType OldConstantName;

AddNamespaceToName

Adds namespace to constant accessor in generated wrapper. Useful in situations like this:

namespace DiplomacyOfferPeace
{
//@ASBindGen Constant ... AddNamespaceToName=DiplomacyOfferPeace
const Urho3D::StringHash ENEMY_NAME_HASH ("EnemyNameHash");
}