cc.Integer property allows for floating-point value steps

I have an integer property on my script:

@property(cc.Integer)
sideColliderTag: number = 0;

However, using the property’s spinner (up/down buttons) changes the value in 0.1 steps:
12

Is this a bug, or am I doing something wrong?

it works correctly with the decorator written in this way:

  @property({type: cc.Integer})

probably a bug on CC side.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

Thanks, that indeed fixes it.

To make VS Code IntelliSense not complain, I had to use:

@property({type: cc.Integer})