Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

IL2CPP Build not behaving like Mono

Discussion in 'Android' started by PB_B, Mar 11, 2021.

  1. PB_B

    PB_B

    Joined:
    Dec 1, 2020
    Posts:
    2
    Hello there :)

    I have recently switched scripting backend from Mono to IL2CPP to be able to tick the ARM64 box to meet Google play store's rules. If I use this method, the build is successful and Google doesn't block the application anymore which is great. However, some parts of my scripts don't seem to be working as usual. The most obvious one I have identified is the function Physics.Raycast() which always returns false where it returns true on a Mono build.

    So I only see two solutions here:
    • Manage to build with Mono scripting backend with a 64bit support
    • OR Manage to make the raycast work with IL2CPP
    To be fair it seems really weird to me that the scripting backend mode changes the behaviour of my scripts so maybe there's something I'm missing.

    I'm happy to provide extra info, parts of code, etc if necessary.

    Unity version: 2020.1.17f1
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    I'm not familiar with the behavior of Phsyics.Raycast(), but I don't believe that it should behave differently with IL2CPP. Can you submit a bug report?
     
  3. PB_B

    PB_B

    Joined:
    Dec 1, 2020
    Posts:
    2
    Yes sure, I'll do it now
     
    JoshPeterson likes this.