Issue:
I am not able to see Video Ads when I deploy the Unity VideoAdsSample project as a Windows Store App. Below are the steps I am taking and the results.
- Ran the PowerShell script successfully.
- Opened the Unity Video Ad Sample project unityplugins-master\Samples\Advertising\VideoAdsSample
- Imported unityplugins-master\UnityPackages\Microsoft.UnityPlugins.Advertising
- I attempted to build the project as Window Store app and received the attached error
- I was able to resolve the issue by changing the platforms for plugins from "Any Platform" to "Editor" on Assets/Plugins/Microsoft.UnityPlugins.Advertising
- I was then able to build for the Window Store
- I added Microsoft.UnityPlugins.Utils.Initialize((action) => AppCallbacks.Instance.InvokeOnAppThread(new AppCallbackItem(() => action()), false)) after Window.Current.Activate() within App.xaml.cs
- I rebuilt the solution for Release x86 and received the following error message. I have attached a screenshot and the output for Build and Debug.
**************** BEGIN Output_Build.txt *****************
1>------ Build started: Project: VideoAdsSample, Configuration: Release x86 ------
1> UnityInstallationDir "C:\Program Files\Unity\Editor".
1> UnityWSAPlayerDir "C:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport".
1> UnityProjectDir "C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample".
1> Copying unprocessed assemblies...
1> Running AssemblyConverter...
1> AssemblyConverter done.
1> VideoAdsSample -> C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\VideoAdsSample.exe
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1778,5): warning APPX1707: No implementation file was provided for the .winmd file 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\Microsoft.Advertising.winmd'. To generate registration information in the app manifest, specify the 'Implementation' metadata on the .winmd reference item in the project file.
2>------ Deploy started: Project: VideoAdsSample, Configuration: Release x86 ------
2>Updating the layout...
2>Copying files: Total 4 mb to layout...
2>Checking whether required frameworks are installed...
2>Registering the application to run from layout...
2>Deployment complete (913ms). Full package name: "VideoAdsSample_1.0.0.0_x86__pzq3xp76mxafg"
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
**************** END Output_Build.txt *****************
**************** BEGIN Output_Debug.txt *****************
'VideoAdsSample.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.1.0_1.0.23302.0_x86__8wekyb3d8bbwe\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\entrypoint\VideoAdsSample.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Symbols for the module 'VideoAdsSample.exe' were not loaded.
- Use a debug build configuration or disable the debug option 'Enable Just My Code'.
- Check the 'Symbols' settings under debugging options.'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\WinMetadata\Windows.winmd'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.InteropServices.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\UnityPlayer.winmd'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.WindowsRuntime.UI.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\Microsoft.UnityPlugins.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\WinRTBridge.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\BridgeInterface.winmd'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\UnityEngine.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\Assembly-CSharp-firstpass.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\Assembly-CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\UnityEngine.Networking.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\UnityEngine.UI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Net.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Private.Networking.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Reflection.Primitives.dll'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Reflection.dll'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Text.Encoding.dll'. Module was built without symbols.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Diagnostics.Debug.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Module information:
Built with Compiler Ver '190023026'
Built from '5.2/release' branch
Version is '5.2.2f1 (3757309da7e7)'
Release build
Application type 'XAML'
Used 'UWP'
PlayerConnection initialized from C:/Users/scott.havird/Downloads/unityplugins-master_1.0/unityplugins-master/Samples/Advertising/VideoAdsSample/out_2015.11.02_pm/VideoAdsSample/bin/x86/Release/AppX/Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55179
Multi-casting "[IP] 10.0.1.6 [Port] 55179 [Flags] 2 [Guid] 1889589057 [EditorId] 4294967295 [Version] 1048832 [Id] MetroPlayerX86(DESKTOP-F93AH1S) [Debug] 0" to [225.0.0.222:54997]...
GfxDevice: creating device client; threaded=1
Disabling Low Latency presentation API.
Direct3D:
Version: Direct3D 11.0 [level 11.0]
Renderer: NVIDIA GeForce GT 750M (ID=0xfe9)
Vendor: NVIDIA
VRAM: 1990 MB
Initialize engine version: 5.2.2f1 (3757309da7e7)
Disabling independent input source.
Logical Screen DPI is 144.00.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\UnityEngineProxy.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\Microsoft.UnityPlugins.Advertising.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Text.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'VideoAdsSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\bin\x86\Release\AppX\System.Globalization.dll'. Module was built without symbols.
Start-ad initiation
(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 70)
Exception: Object reference not set to an instance of an object.
Type: System.NullReferenceException
Module: Assembly-CSharp
InnerException:
AdditionalInfo:
at mainSceneManager.Start()
at mainSceneManager.$Invoke7(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)
NullReferenceException: Object reference not set to an instance of an object.
at mainSceneManager.Start()
at mainSceneManager.$Invoke7(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)
NullReferenceException: Object reference not set to an instance of an object.
at mainSceneManager.RequestAd()
at UnityEngine.Events.InvokableCall.Invoke(Object[] args)
at UnityEngine.Events.InvokableCallList.Invoke(Object[] parameters)
at UnityEngine.UI.Button.Press()
at UnityEngine.UI.Button.OnPointerClick(PointerEventData eventData)
at UnityEngine.EventSystems.ExecuteEvents.Execute(IPointerClickHandler handler, BaseEventData eventData)
at UnityEngine.EventSystems.ExecuteEvents.Execute[T](GameObject target, BaseEventData eventData, EventFunction`1 functor)
(Filename: Line: 0)
NullReferenceException: Object reference not set to an instance of an object.
at mainSceneManager.ShowAd()
at UnityEngine.Events.InvokableCall.Invoke(Object[] args)
at UnityEngine.Events.InvokableCallList.Invoke(Object[] parameters)
at UnityEngine.UI.Button.Press()
at UnityEngine.UI.Button.OnPointerClick(PointerEventData eventData)
at UnityEngine.EventSystems.ExecuteEvents.Execute(IPointerClickHandler handler, BaseEventData eventData)
at UnityEngine.EventSystems.ExecuteEvents.Execute[T](GameObject target, BaseEventData eventData, EventFunction`1 functor)
(Filename: Line: 0)
Trimming D3D resources.
The program '[14168] VideoAdsSample.exe: Program Trace' has exited with code 0 (0x0).
The program '[14168] VideoAdsSample.exe' has exited with code 1 (0x1).
**************** END Output_Debug.txt *****************
The output for the build shows some interesting information, line 9 from Output_Build.txt"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1778,5): warning APPX1707: No implementation file was provided for the .winmd file 'C:\Users\scott.havird\Downloads\unityplugins-master_1.0\unityplugins-master\Samples\Advertising\VideoAdsSample\out_2015.11.02_pm\VideoAdsSample\Microsoft.Advertising.winmd'. To generate registration information in the app manifest, specify the 'Implementation' metadata on the .winmd reference item in the project file." Could this be why I am recieving the null reference exception?
Setup:
unityplugins version 1.0
Visual Studio Enterpirse 2015 Version 14.0.23107.0 D14REL
.NET Framework Version 4.6.00079
Thanks,
Scott