Search Unity

dynamic type causing crashes in UWP build

Discussion in 'Windows' started by AVAVT, Oct 22, 2020.

  1. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    Hello, I'm building my game to UWP, and having trouble with the
    dynamic
    type.

    One of the library I'm using uses a lot of
    dynamic
    for arguments e.g.
    List<dynamic> ToGTV(dynamic[] args)
    .

    The game run fine on editor, or when built to standalone. But when I build it to UWP platform (I need schema deeplink), the compiled Visual Studio solution keep crashing at lines that uses dynamic.

    Debugging in Visual Studio Output I see the function signature changed to
    TransactionBuilder.ToGTV (System.Object[] args)
    .

    So I went and change the functions to use
    object[]
    instead e.g
    List<object> ToGTV(object[] args)
    , then the function passed. So it seems like my UWP project can't handle dynamic type.

    Is there anyway I can make the generated VS project handle
    dynamic
    type? I can only change the lib source code to test, it's not a long term solution for me.
     
    Last edited: Oct 22, 2020
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which Unity version are you on?
     
  3. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    2020.1.9f1
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Can you file a bug on this? I'm not exactly sure why it doesn't work - we'd need to dig into it.