Search Unity

[Resolved] D3D application type doesn't handle prelaunch, fails WACK

Discussion in 'Windows' started by rizzin, Jan 31, 2016.

  1. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    My game fails to complete all Windows Application Certification Kit tests because it doesn't handle prelaunch at all. (the application should have a void OnLaunched(LaunchActivatedEventArgs args) function)

    I have searched the internet and found out that if you use XAML build type, you get App.xaml.cs file that has that function by default, whereas for the D3D build there's no such function present. Moreover, the main App class doesn't even inherit from the Application class.

    I also do not see a simple way to implement that function. From what I've gathered, XAML stuff and the game code run in different threads, and it feels like the App.cs code is related to the second one.

    Here are my questions:
    - Can I keep the D3D build type and somehow implement the OnLaunched function?
    - I think I can simply exclude the prelaunch test from WACK. Is it correct, and shall I be able to release the game given that the game will pass all other tests?
    - There's an easy way out - simply to rebuild the game using XAML, but I've read that it is worse in terms of performance, and we don't use any XAML stuff in the game. How bad is the performance difference?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    How did you come to that conclusion? You definitely don't need that function to pass WACK.
     
  3. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    @Tautvydas Zilys well, it's simple, really.
    I built the project in Unity, then opened it in Visual Studio. Then I selected the "Create Packages..." option. After it had finished, I got a WACK window where all the tests were selected by default. I was like "okay whatever" and let it do its thing.

    When it was done, I got a window that said that my application failed WACK, and on the results webpage only the prelaunch test had "failed" in front of it.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Could you paste the failed WACK log?
     
  5. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    I'm running the whole build process again right now, and I'll have the log in about half an hour.
     
  6. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    @Tautvydas Zilys alright, it's done, and the result is the same.

    WACK creates a lot of log files, so here's an archive with all the relevant ones
     

    Attached Files:

  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I'm pretty sure the requirement to handle prelaunch in with LaunchActivatedEventArgs applies to XAML applications only. On the other hand, I could not reproduce WACK failure locally (just tried it). Could you try running WACK on your machine on an empty project? I wonder if it's something in your project it doesn't like, something with what Unity is doing or something with your setup.
     
  8. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    Alright, I'll try that right now.
     
  9. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    I have successfully reproduced the bug with an empty project. I used ".Net Core" compliation override and .Net scripting backend.

    During the package creation process I used my windows store application as the target, so the info in Package.appxmanifest (package name, publisher, etc) correspond to the ones in the app dashboard.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What version of Windows are you running on? Are you by any chance on an insider build?
     
  11. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    Microsoft Windows 10 Pro Insider Preview (10.0.11082.0)

    You think this could be a problem?
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    BFS-Kyle likes this.
  13. rizzin

    rizzin

    Joined:
    Feb 1, 2013
    Posts:
    25
    Alright, huge thanks for helping to clear this out!