Search Unity

Trigger Not Working Correctly

Discussion in '2D' started by Vaulcul, Jun 29, 2020.

  1. Vaulcul

    Vaulcul

    Joined:
    Apr 3, 2016
    Posts:
    45
    Using Unity 2019.4.1f1

    I had a perfectly working trigger that would turn off the Tilemap Collider 2D on a chosen tilemap on entry and turn it back on, on exit.

    ...It still works... but never on the first attempt. Or not correctly anyhow.

    The inspector shows that the status of the collider is as the trigger is telling it to be, but the actual game doesn't turn off the collider. I can usually fix this by turning the collider off and back on manually... and then the game works fine... generally speaking.

    But, I'm baffled as to why this all of a sudden started happening, it also happens in multiple scenes.

    Below is the only error in the console, and from what I've found online it is a throw away error It's been around for a while and I am unable to get rid of it... It also doesn't seem to be effecting anything:


    The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(MonoBehaviour) playerId


    Anyhow, it's hard to provide a picture or video of the issue, but I'm willing to provide a project file as necessary.