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

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,506
    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,506
    Can you file a bug on this? I'm not exactly sure why it doesn't work - we'd need to dig into it.