Colliders on Layer 7 (custom layer) wouldn't work

Hi all,

My ladder colliders won’t work (the player walks right through it despite Rigidbody and never checking the isTrigger) as long as I set my Climbing Tilemap to User Layer 7 which currently is named “Climbing”. Everything work smoothly once it’s set to User Layer 8.

I did some testing, and it didn’t seem like a problem with naming as well. The colliders just won’t work when it’s on Layer 7 no matter what name it is given.

My game works fine, but I’m just genuinely curious about what could have caused it. I’ve spent many hours on it already, and honestly It has started to annoy me a little. ;( I wonder if it has happened to anyone else. Thanks a great deal if anybody could shed some light on it.

Best,
Q

Hi Q,

Welcome to our community! :slight_smile:

Your problem sounds indeed odd. Did the layer have got another name before? Or could there have been a typo such as “⍽Climbing” or “Climbing⍽”? The spaces are characters, too. (In my example, ⍽ is supposed to be a placeholder for a space character to make it obvious what I mean.)

If the layer had another name, there might be or have been an internal problem in Unity. Maybe outdated data was still in the cache, maybe Unity used that data. In a browser, you would simply clear the cache. In Unity, that’s not possible. Restarting often fixes issues, and you could (while Unity is not running) delete the Temp and Library folders in your Assets folder if a weird problem persists.

Before experimenting around, make a backup of your project folder by duplicating it. Save the duplicated folder somewhere else, maybe on an USB stick. To save some free space, you could delete the Library and Temp folders in the backup folder.

If you don’t want to experiment around, use layer 8.

One more thing: The screenshot in the manual shows that the numbers of layers 3, 6 and 7 are greyed out. Is that also the case in your version of Unity? Unfortunately, the doc does not reveal any information on that, so the greyed out numbers might be related to your problem, or maybe they don’t.


See also:

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

Privacy & Terms