Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved OnCollisionEnter stopped working on Android and iOS

Discussion in 'Android' started by VOXELIUM, Feb 29, 2024.

  1. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    50
    I have a ball

    Снимок экрана 2024-02-29 в 15.05.47.png

    and several objects that he collides with

    Снимок экрана 2024-02-29 в 15.06.32.png

    during the collision I call the method

    IMAGE 2024-02-29 15:11:03.jpg

    It used to work in Editor and on mobile, but yesterday for some reason the OncollisionEnter method stopped working on mobile

    I'm watching via Logcat
    not a single Debug in the OnCollisionEneter method is called on mobile phones and they are all called in the Editor
    IMAGE 2024-02-29 15:11:03.jpg
    What happened?

    I suspect Unity is making an error during the mobile build. Because of this, OncollisionEnter does not work on mobile devices.
     
    Last edited: Feb 29, 2024
  2. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    50
    Problem solved
     
  3. Username_K423

    Username_K423

    Joined:
    Apr 22, 2024
    Posts:
    1
    May I ask how it was resolved
     
  4. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    50
    Unfortunately, I don't remember anymore. It was a long time ago. That was my fault. This is not a Unity bug