Skip to content

Can't set Tile.objectGroup back to null #3495

@juanitogan

Description

@juanitogan

Describe the bug

I can't find a way to remove an ObjectGroup from a Tile. That is, to set Tile.objectGroup back to null after setting it. Either I'm just not finding it, or a method or something is missing.

The best I can currently do is either loop through and remove all objects from the group, or assign it a new empty group.

To Reproduce

tile.objectGroup = new ObjectGroup()
tile.objectGroup = null

Expected behavior

The ObjectGroup associated with the tile in case collision shapes were defined. Returns null if no collision shapes were defined for this tile.

If it can be null (which it can), I should be able to set it back to null, either directly or via method.

Specifications:

  • OS: Windows 10
  • Tiled Version: 1.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBroken behavior.good first issueGood thing to start with, and don't be shy to ask for help!hacktoberfestGood thing to try for Hacktoberfest participants.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions