locked
Integrate Microsoft Ads for Unity RRS feed

All replies

  • Hi

    Anybody knows how to Integrate MS Ad for Unity that target Windows Store or any Ad Network could use ?

    • Merged by Mattew Wu Wednesday, May 3, 2017 1:58 AM duplicated
    Tuesday, April 25, 2017 2:51 AM
  • Hi

    Anyboby knows how to integrate Microsoft ads for unity or any ad network could use

    • Merged by Mattew Wu Wednesday, May 3, 2017 2:05 AM duplicated
    Tuesday, April 25, 2017 3:00 AM
  • Hi

    Anybody knows how to integrate Ms Ads in unity ?

    • Merged by Mattew Wu Wednesday, May 3, 2017 2:11 AM duplicated
    Tuesday, April 25, 2017 3:04 PM
  • Hi L.a.t,

    According to this link: https://github.com/Microsoft/unityplugins/issues/1 , it seems Microsoft/unityplugins doesn’t support banner ads.

    So perhaps you could post to https://github.com/Microsoft/unityplugins/pulls?q=is%3Aopen+is%3Apr to ask if it will be supported in the future.

     

    Best Regards,

    Annievia Chen


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 27, 2017 10:12 AM
  • Hello,

    What do you mean when say integrate? If you export from Unity game with XAML UI then you can add Ads as in standard app. But if you export with DirectX UI then I think it is not clear enough how to do that.


    Make the community better together


    Thursday, April 27, 2017 6:53 PM
  • Hi, I speak spanish but I'll try to explain how I do it. I do not use any plugin.

    In the Unity editor I declare a public static event Action

    public class MyObject : MonoBehaviour {
    public static event Action <void> showBanner;
    }
    The moment I want to show the banner I call the action like calling a procedure
    void initGame(){
    int x=2;
    showBanner();
    }

    Export the project to Visual Studio and automatic will be create a file called MainPage.cs inside in create an initiation procedure

    private void inicia() {
    MyObject.showbanner += MyObject_showBanner; // Add the action by pressing tab for automatic creation
            }
    
    
     private void MyObject_showBanner()
            {
                AppCallbacks.Instance.InvokeOnUIThread(() => //This is for run code on Main thread
                {
              AdControl  pubcenter = new AdControl();
                pubcenter.ApplicationId = "3f83fe91-d6be-434d-a0ae-7351c5a997f1";
                pubcenter.AdUnitId = "test";
                pubcenter.AutoRefreshIntervalInSeconds = 60;
                pubcenter.VerticalAlignment = VerticalAlignment.Top;
                pubcenter.HorizontalAlignment = HorizontalAlignment.Center;
                pubcenter.Width = 350;
                pubcenter.Height = 50;
                grid.Children.Add(pubcenter);
                }, false);
            }
    
    
    public MainPage(){
    inicia(); //At the end of the constructor you call the procedure
    }

    This is the way to communicate unity project with your Visual Studio project either to show Microsoft banner ads or to show Vungle videos ads.

    I hope I have oriented you, if you have more doubts my twitter is @jusoDev







    I have same problem !!



    • Edited by Juso Friday, May 5, 2017 1:49 AM
    Friday, May 5, 2017 1:45 AM
  • In short, Microsoft has not yet supported banner ads on Unity.
    Saturday, May 6, 2017 9:35 AM