Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits)

Collider2DExtensions.cs Exception

'Collider2D' does not contain a definition for 'compositeCapable' and no accessible extension method 'compositeCapable' accepting a first argument of type 'Collider2D' could be found (are you missing a using directive or an assembly reference?)

 'Collider2D' does not contain a definition for 'compositeOperation' and no accessible extension method 'compositeOperation' accepting a first argument of type 'Collider2D' could be found (are you missing a using directive or an assembly reference?)

For Unity2022.3.9, Collider2d cannot find compoisteCapable and compositeOperation properties.

if (merge && !collider2d.compositeCapable)
{
    Debug.LogWarning($"Super Tiled2Unity warning: Collider2D '{collider2d.name}' is not composite capable");
}
collider2d.compositeOperation = merge ? Collider2D.CompositeOperation.Merge : Collider2D.CompositeOperation.None;