Auto regen of collision shapes for tilemap throws errors if other collision object is present in go (DEF-3609)

Problem:
Setting tiles on a tilemap from code causes the collision shapes to be regenerated. If there is another collision object in the same game object errors are thrown.

Error message:
ERROR:GAMESYS: Hulls can only be set for collision objects with tile grids as shape.
image

Reproduce:
A gameobject with the following:

  • a tilemap with a tilesource defining colliders
  • a collision object with the tilemap as shape
  • a second collision object with a box shape

From a script on the go, set a tile on the tilemap. This causes the collision shapes to be regenerated and also throws errors.

3 Likes

Added ticket DEF-3609 to track this.

4 Likes