Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Project Tiny compatibility with the Cordova Framework?

Discussion in 'Project Tiny' started by portaplay, Oct 29, 2019.

  1. portaplay

    portaplay

    Joined:
    May 17, 2013
    Posts:
    10
    We are working with a Broadcaster, who have a html5 based app, with a lot of kids games. The app is made using the Cordova web-app application framework (js based).

    We have found a compatibility bug when trying to run a Project Tiny project, through their app. It starts throwing errors, when the cordova framework starts loading/executing (even before the game code starts loading).

    [See attachment]

    "A managed exception was thrown. The Tiny runtime does not support managed exceptions"
    and
    "No native stack trace exists. Make sure this platform suport native stack traces".

    Cordova does mention anywhere, that it does not support stack tracing. Or that it uses managed exceptions. But that does offcause not means, that it is not the case(s).

    So the question is, whether this is a well know compatibility bug - Project Tiny will never by able to run inside the framework at all?
    - or if there is a work-around?
    - or if there is a upcoming fix?
    - or if maybe never versions of the Cordova framework might fix this?

    Any pointers, would be really great.
     

    Attached Files:

  2. egonaraujo

    egonaraujo

    Joined:
    Jan 21, 2015
    Posts:
    18
    I have never used Cordova so I am just trying to propose ideas here...

    But one issue that might be happening is that the Unity Tiny stores all the assets in a separate Data folder, and the access to it is done by "XMLHttpRequest". Sometimes servers or frameworks do not allow http requests to be made via code, so this may throw the error you see (not loading the base scene)

    I searched some docs and this link might be helpful to test the issue: Whitelist on Cordova

    Another thing you might look is my thread about putting it in a single HTML file, the whole proccess takes about 2 hours depending on the assets of the game, but I was able to run my game using only that one file
    Put the C# to wasm build into single HTML