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. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

X64 Define required for Interop

Discussion in 'Unity 5 Pre-order Beta' started by topherr, Jan 1, 2015.

  1. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    Some external libraries need to change calling conventions for Interop on x86 and x86_64. This requires a define for compilation.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,658
    Could you give an example of those different calling conventions?
     
  3. topherr

    topherr

    Joined:
    Jun 1, 2013
    Posts:
    25
    Sure.

    For Steamworks.NET (https://github.com/rlabrecque/Steamworks.NET) Unity 5 currently doesn't work with the x64 version without changing to CallingConvention.ThisCall. CallingConvention.ThisCall crashes the x86 version, and requires StdCall to work. Couldn't tell you why, Mono just falls over.

    I didn't write this library, but it has this to say on the matter:

     
    DanSuperGP likes this.