Search Unity

Windows Store Native IAP Plugin (until IL2CPP is supported in Unity IAP)

Discussion in 'Windows' started by AVOlight, Jan 26, 2016.

  1. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Yup, it does not, all thanks to destructors and reference counter pointers.
     
  2. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    using this example, what does it mean if i only get

    b
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)

    printed in the log?

    ---

    seems like using an IntPtr is the easiest way

    Marshal.PtrToStringAuto(message);

    reads out the whole string instead of just the first character
     
    Last edited: Sep 29, 2016
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It means you forgot [MarshalAs(UnmanagedType.LPWStr)] for the parameter somewhere in the callback signature on C# side.
     
    AVOlight likes this.
  4. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    @Tautvydas-Zilys Thank you. didn't know it had to go in the delegate definition as well