Is it possible to specify values which otherwise start from 0 in enumeration attributes?
Referring to http://developer.playcanvas.com/en/api/pc.script.html#attribute
pc.script.attribute('spellType', 'enumeration', 0, {
enumerations: [{
name: "Fire",
value: 0
}, {
name: "Ice",
value: 1
}]
});
We see that Fire === 0 and Ice === 1.
But what if I want Fire to be = 8 and Ice to be 3.
pc.script.attribute('spellType', 'enumeration', 0, {
enumerations: [{
name: "Fire",
value: 8
}, {
name: "Ice",
value: 3
}]
});
This doesn’t seem to work, when choosing Fire or Ice in the Editor attribute dropdown, Fire is always 0 and Ice is always 1.