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

[Updated] Windows Store Native

Discussion in 'Assets and Asset Store' started by ClaytonOne, Mar 15, 2016.

  1. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Plugin that provides easy and flexible functionality for Windows Store that is not available in Unity, including in-app purchases, dialogs, pickers and ads.
    The plugin comes with complete documentation and a sample scene to get you started quickly!

    Available on the asset store | Documentation | Support

    Features

    **Facebook**
    - Authentication, Api Access & Dialogs

    **Twitter**
    - Authentication, Api Access & Dialogs

    **Advertising**
    - Display Banner Ads from Microsoft and AdDuplex
    - Display Interstitial Video Ads from AdDuplex, Microsoft and Vungle

    **Web**
    - Show a web browser and make REST calls

    **In App Purchases**
    - Full support for in app purchases

    **Dialogs**
    - Show native windows dialogs
    - Show native windows popup menus

    **Geolocation**
    - Display Bing maps and add markers
    - Find the users location

    **Files**
    - Reading and writing of files
    - Serialise / Deserialise xml
    - File open / save pickers

    **Notifications**
    - Toast notifications
    - Push notifications

    **Security**
    - Easily encrypt / decrypt data using AES
    - Easily convert to / from base64

    **Engagement**
    - Link to your apps store page
    - Launch the Feedback Hub
    - Send emails
    - Native share dialog
    - Capture screenshots

    **Input**
    - Listen for input events
    - Support the Surface Pen

    **Tiles**
    - Create and pin secondary tiles

    **Device**
    - Flashlight

    **Miscellaneous**
    - UI Dispatcher

    Supported Platforms

    - Windows Phone 8.1 / 10
    - Windows Universal 8.1 / 10
    - Xbox One
    - HoloLens


    Any feature requests / suggestions please post below
     
    Last edited: Dec 9, 2017
    Aseemy and theANMATOR2b like this.
  2. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    Good job, waiting for ads to be available. Really going to help a lot of people.

    EDIT - I see that you have already added interstitial ads, KUDOS to you.
    banner ads are also needed, i would gladly pay for banner & interstitial ads to be available.

    Again, great job.
     
    Last edited: Mar 30, 2016
  3. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    Hi, i am testing your ads implementation and have an issue.

    I wasnt able to display interstitial ads following your method from the website, I noticed that in your ConfigureInterstitalAd method you have used the following code :
    Code (CSharp):
    1.             WSANativeInterstitialAd.Request += (appId, addUnitId) =>
    2.             {
    3.                 interstitialAd.RequestAd(AdType.Video, appId, addUnitId);
    4.             };

    In line 3 you have used AdType.Video but the addUnitId is of Image type.

    So I used this ID: 11389925, and it worked.

    In Banner events, WSANativeBannerAd.IsEngagedChanged is never fired.
     
  4. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Hi Aseemy - Video is currently the only supported type (see here). If you mean the test adunitid is an image one, then yes you are correct that the right value is 11389925.

    I'll check WSANativeBannerAd.IsEngagedChanged
     
    Last edited: Apr 14, 2016
  5. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    I understand that video is the only available option, its just that in the sample scene you provided, the addUnitId was not of a video ad, so i checked google and used the correct addUnitId.

    I am also unable to test your advertising on an emulator, i get this Exception thrown at me:
    Code (CSharp):
    1. Exception thrown at 0x7708210B in Colors Fun and Learn.exe:
    2. Microsoft C++ exception: Platform::COMException ^ at memory location 0x0B65F85C.
    3. HRESULT:0x80070002 The system cannot find the file specified.
    4. WinRT information: The system cannot find the file specified.
    5. Stack trace: [External Code]
    6.         UniversalXamlAdControl.WindowsPhone.dll!68d9df2e()
    7.         UniversalXamlAdControl.WindowsPhone.dll!68da5d54()
    8.         UniversalXamlAdControl.WindowsPhone.dll!68de126c()
    9. [External Code]
    10. If there is a handler for this exception, the program may be safely continued.

    The app never starts, I understand that emulators are x86 and the plugin might only be compatible with ARM, but I do need to test the non ad parts of my game as well. It would be cumbersome to remove advertising each time i put a new update to test it on emulator.

    One small thing - In the setup section of Interstitial Ads on your Documentation page:
    Code (CSharp):
    1. private void ConfigureInterstitalAd()
    2. {
    3.     InterstitialAd interstitialAd = new InterstitialAd();
    4.     interstitialAd.AdReady += (s, e) => { WSANativeInterstitialAd.RaiseActionOnAppThread(WSANativeInterstitialAd.AdReady); };
    5.     interstitialAd.ErrorOccurred += (s, e) => { WSANativeInterstitialAd.RaiseActionOnAppThread(WSANativeInterstitialAd.ErrorOcurred); };
    6.     interstitialAd.Completed += (s, e) => { WSANativeInterstitialAd.RaiseActionOnAppThread(WSANativeInterstitialAd.Completed); };
    7.     interstitialAd.Cancelled += (s, e) => { WSANativeInterstitialAd.RaiseActionOnAppThread(WSANativeInterstitialAd.Cancelled); };
    8.     WSANativeInterstitialAd.Request += (appId, addUnitId) =>
    9.     {
    10.         interstitialAd.RequestAd(AdType.Video, appId, addUnitId);
    11.     };
    12.     WSANativeInterstitialAd.Show += () =>
    13.     {
    14.         AppCallbacks.Instance.InvokeOnUIThread(() =>
    15.         {
    16.             if (interstitialAd.State == InterstitialAdState.Ready)
    17.             {
    18.                 interstitialAd.Show();
    19.             }
    20.         }, false);
    21.     };
    22.     WSANativeInterstitialAd.Close += () =>
    23.     {
    24.         if (interstitialAd.State == InterstitialAdState.Showing)
    25.         {
    26.             interstitialAd.Close();
    27.         }
    28.     };
    29. }
    In line 5 there is a typo, WSANativeInterstitialAd.ErrorOcurred should be WSANativeInterstitialAd.ErrorOccurred. Double c (cc) instead of a single one in Occurred.

    Edit - Is there a feature request section in your website? If so let me know I'll post there as well.
    1. Ability to share text/image to social apps like whatsapp and facebook.
    2. Ability to take a screenshot and save to camera roll
     
    Last edited: Apr 15, 2016
  6. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    When you were running on the emulator what platform was it? (i.e 8.1 Universal / 10 Universal etc)
     
  7. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    app made from unity 5.3.4
    module was windows phone 8.1 (not universal)
    visual studio 2015 community
    windows 10 64 bit professional

    Another issue I am facing is pressing the back button while the video ad is playing. The back button does skip the video but then fires again on the current scene as well.
    I have setup my scene such that if back button is pressed then go to previous screen.
    In Unity and Admob video ads on android when i press the back button, only the video is skipped and my scene does not change. But here when i press back button, the video is skipped then my scene is changed as well.

    A fix i made was that i created a boolean to check if video is playing and only implement my back button when the video is not playing. See if its possible to fix it at your end.
     
  8. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Interstitial ads are only supported on Universal 8.1 and Universal 10 - that could be why you are seeing errors when attempting to run on the emulator for Silverlight 8.1
     
  9. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    Interstitial test ads are working for me

    EDIT - Only test ads are working, neither banner or interstitial video are working on my live app.
    hmm, Unity IAP is also not working on my live app.

    Unity IAP is working on the android live app but not on windows.
    Gonna try your IAP for windows now.
     
    Last edited: Apr 17, 2016
  10. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Did you configure your live ads through dev center and enter the real appid and adunitid it gave you?
     
  11. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    dev.jpg
    i got the ids through here, banner and interstitial. i see that video ads arent shown in my country but the banner ads should work. i set the size of banner to 320x50, working in tesdt ads but not in my ad unit.
     
  12. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    Should I post on your website for support?
     
  13. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Hi Aseemy - yep please contact me through the website.
     
  14. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add toast notifications]
     
  15. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add Bing maps and location services]
     
  16. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    182
    When did the price change? I was watching this thread for the past few months as I know I would need it, but did not download it when it was free as I didn't need it yet. I wish unity would allow you to purchase free assets without downloading them; I already missed SpeedTree's Black Gum tree when it was free because of this.
     
    theANMATOR2b likes this.
  17. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Hi, if you download the asset into a blank project, then you'll be able to use it in future in any project I think.
     
  18. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    You can download the project, and when it asks you to import it click on cancel. the asset will be stored in your library.
    BTW its just $10, great support from author.
    I have it for free, but with the first $10 i make from the app i am using this on i will buy the asset.

    Seriously, he has helped me for over a month answering various questions, and that too when the asset was free.
     
    theANMATOR2b likes this.
  19. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add push notifications, flashlight and email]
     
  20. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add AES Encryption and Base64 Encoding]
     
  21. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add Facebook Authentication]
     
    Aseemy likes this.
  22. gerov

    gerov

    Joined:
    Jul 18, 2016
    Posts:
    2
    Hi all. Im new to Unity and C# , can u help me with share button implementation in my project ? what windows native store script to use for share ? Tnx in advance .
     
  23. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    Share feature is not yet present in this plugin. Anyone correct me if i am wrong.
     
  24. gerov

    gerov

    Joined:
    Jul 18, 2016
    Posts:
    2
    Tnx mate. My mistake ,Im still noob. Im having a lot of troubles and will post soon my questions hope u have a lot of patients :D
     
  25. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Guys, we are looking at adding the Facebook share feature at the moment
     
    Wadjey likes this.
  26. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    Thank you for working on this feature, please consider also to add "take screenshot and share it" feature (using the native sharing menu of WP/Win10).
     
  27. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Ok noted.
     
  28. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add show/hide banner ads, check if a Facebook page is liked and read any Facebook graph Api edge]
     
    Aseemy and Wadjey like this.
  29. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add Facebook dialogs, native share and screenshots]
     
    Aseemy and Wadjey like this.
  30. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    in the facebook share feature, can we check if the user has actually shared something? then give them a reward based on it.
     
  31. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    You'd probably have to look at what is on their timeline as I don't think the share dialog returns a result.
     
  32. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    [Updated to add Facebook support for Windows 8.1]
     
  33. Panzer_Ihnen

    Panzer_Ihnen

    Joined:
    Jan 20, 2017
    Posts:
    7
    When I follow the web instructions for using intertitial ads from Microsoft, "InterstitialAdManager.cs" throws me a compilation error: WSANativeInterstitialAd has no definition for RaiseActionOnAppThread. I'm missing something?
     
  34. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Ping us a message http://claytoninds.com/#support
     
  35. Panzer_Ihnen

    Panzer_Ihnen

    Joined:
    Jan 20, 2017
    Posts:
    7
    I have tried it, many times, but always gives the error "Send CAPTCHA Verification Failed" Although the captcha is checked as ok. Is there another way to contact you?
     
  36. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
  37. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I cannot use it anymore with 2017.2.

    Assets\WSANative\Facebook\WSAFacebookApi.cs(66,38): error CS0104: 'Grid' is an ambiguous reference between 'Windows.UI.Xaml.Controls.Grid' and 'UnityEngine.Grid'
     
  38. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    203
    In the WSAFacebookApi.cs file just replace Grid with Windows.UI.Xaml.Controls.Grid
     
  39. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Sorry for the late reply, fixed in the latest update.
     
  40. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    121
    Any news on Facebook + IL2CPP ?
     
  41. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Working on it at the mo
     
  42. VinodShanbhag

    VinodShanbhag

    Joined:
    Mar 16, 2014
    Posts:
    6
    Hello,
    I am using old store api.

    I am getting empty list when I fire this function

    WSANativeStore.GetProductListings((List<WSAProduct> products) =>
    {
    });

    Am I missing something?
     
  43. ClaytonOne

    ClaytonOne

    Joined:
    Sep 5, 2015
    Posts:
    89
    Think I just replied to your email
     
    VinodShanbhag likes this.
  44. LSPredator

    LSPredator

    Joined:
    Jun 23, 2014
    Posts:
    35
    Hi!
    Thank you for awsome asset!
    I have strange problem.
    I want to show ads in my game. I added AdDuplex SDK, complete all your instractions from documentation.
    But when I try to build IL2CPP build I get error: "LINK : fatal error LNK1181: cannot open input file 'E:\Unity.obj'".

    Please help.

    End of build log:
    1>Encoding.cpp
    1>NativeMethodsTests.cpp
    1>Initialize.cpp
    1>class-internals.cpp
    1>Thread.cpp
    1>Messages.cpp
    1>ObjectFiles: 829 of which compiled: 829
    1> Time Compile: 109223 milliseconds Win32ApiWinRTEmulation.cpp
    1> Time Compile: 109183 milliseconds Environment.cpp
    1> Time Compile: 49941 milliseconds Il2CppTypeDefinitions.cpp
    1> Time Compile: 43802 milliseconds Il2CppComCallableWrappers35.cpp
    1> Time Compile: 40630 milliseconds Il2CppComCallableWrappers31.cpp
    1> Time Compile: 34989 milliseconds Il2CppComCallableWrappers36.cpp
    1> Time Compile: 30719 milliseconds Bulk_System_3.cpp
    1> Time Compile: 30461 milliseconds Bulk_mscorlib_0.cpp
    1> Time Compile: 30320 milliseconds Bulk_Generics_30.cpp
    1> Time Compile: 28801 milliseconds Il2CppMetadataUsage.cpp
    1>Total compilation time: 668481 milliseconds.
    1>Creating library E:\Unity Temp\180921\build\obj\il2cppOutputProject\Win32\Master\linkresult_E12AE39EB3625CFB1A6E5C3DD819C0E2\GameAssembly.lib and object E:\Unity Temp\180921\build\obj\il2cppOutputProject\Win32\Master\linkresult_E12AE39EB3625CFB1A6E5C3DD819C0E2\GameAssembly.exp
    1>LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
    1>Total link time: 598955 milliseconds.
    1>Encoding map file using command: E:\Unity Temp\180921\Il2CppOutputProject\IL2CPP\MapFileParser\MapFileParser.exe -format=MSVC "E:\Unity Temp\180921\build\bin\Win32\Master\GameAssembly.map" "E:\Unity Temp\180921\build\bin\Win32\Master\SymbolMap"
    1>Cleaned up 2 object files.
    1>Done building project "Il2CppOutputProject.vcxproj".
    2>------ Rebuild All started: Project: Business Clicker, Configuration: Master Win32 ------
    2>pch.cpp
    2>App.xaml.cpp
    2>MainPage.xaml.cpp
    2>UnityGenerated.cpp
    2>XamlTypeInfo.Impl.g.cpp
    2>e:\unity temp\180921\business clicker\app.xaml.cpp(95): warning C4973: 'Windows::UI::ViewManagement::IApplicationView2::SuppressSystemOverlays::set': marked as deprecated
    2>e:\unity temp\180921\business clicker\app.xaml.cpp(95): note: Message: 'Use the TryEnterFullScreen method and IsFullScreenMode property instead of SuppressSystemOverlays. For more info, see MSDN.'
    2>LINK : fatal error LNK1181: cannot open input file 'E:\Unity.obj'
    2>Done building project "Business Clicker.vcxproj" -- FAILED.
    ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
     
  45. LSPredator

    LSPredator

    Joined:
    Jun 23, 2014
    Posts:
    35
    I found what's wrong, Path to VS project have spaces. After I deleted spaces package was builded successfully.
    But now I have another probllem.
    Certification test is fail with error:
    "File C:\Program Files\windowsapps\62722vladimirshenkel.businessclicker_1.0.5.0_x86__fadg4j0pa47d6\clrcompression.dll has failed the AppContainerCheck check.
    File C:\Program Files\windowsapps\62722vladimirshenkel.businessclicker_1.0.5.0_x86__fadg4j0pa47d6\clrjit.dll has failed the AppContainerCheck check."

    Does anyone have same problem?
    Does anyone use AdDuplex with IL2CPP backend?
     
    Last edited: Sep 27, 2018
  46. LSPredator

    LSPredator

    Joined:
    Jun 23, 2014
    Posts:
    35
    Any good news about AdDuplex and IL2CPP?
     
    YawJatah likes this.
  47. YawJatah

    YawJatah

    Joined:
    Apr 11, 2015
    Posts:
    4
    I have the same problem. We are now obliged to use IL2CPP for UWP as .NET is depricated.
    Any one has any leads (all the solutions I find online only have to do with enabling .Net native toolchain, but that is only for C#)
     
  48. livingtarget

    livingtarget

    Joined:
    Apr 21, 2015
    Posts:
    57
    I posted a fix for the Certification issue: https://forum.unity.com/threads/unity-2019-1-il2cpp-net-native.735485/

    Not related to AdDuplex itself, but should help.