Unity AppOpenAd - unity3d

I want to add open ads to my game that I developed on Unity, but the type 'AppOpenAd' or namespace name could not be found (are you missing a using directive or assembly reference?) I get an [Assembly-CSharp] error. I would be glad if you help.

Related

Unity script error message namespace MonoBehaviour not found

I've been trying to write a script for my unity project, but the console gives the following error messages.
The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?
The type or namespace name 'Transform' could not be found (are you missing a using directive or an assembly reference?
Anyone got a clue?
https://i.stack.imgur.com/Ddy7J.png
https://i.stack.imgur.com/524pb.png
It's using.UnityEngine; small caps, the u in using is written in lowercase.

Mapbox not opening in unity?

I have the 2020.3.32f1 version of Unity and have tried to open Mapbox version 2.1.1 - the current one I am being told by the Mapbox website to download. It says I need Unity 2017 and higher so everything should be right, correct? Then why does it not load properly and I get the following errors:
Assets\GoogleARCore\SDK\Scripts\ARCoreBackgroundRenderer.cs(43,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\GoogleARCore\SDK\InstantPreview\Scripts\InstantPreviewManager.cs(32,23): error CS0234: The type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Assets\UnityARInterface\ARRemote\Scripts\ARRemoteEditorInterface.cs(40,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\UnityARInterface\Scripts\ARCoreInterface.cs(51,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\UnityARInterface\Scripts\ARKitInterface.cs(26,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
A polygon of Mesh 'cone' in Assets/Mapbox/Examples/2_AstronautGame/AstronautGame/Park/cone.FBX is self-intersecting and has been discarded.
Problem detected while importing the Prefab file: 'Assets/MapboxAR/Prefabs/AR.prefab'.
The file might be corrupt or have missing nested Prefabs. See details below.
Warnings:
Component at index 2 could not be loaded when loading game object 'ARCamera'. Removing it.
So yeah, no matter what I do, it won't load/open properly - the examples window from Mapbox doesn't open, nor does the Ampbox tab appear at the top of the Unity UI. It's really, really annoying, I can't even open the thing!!! I just need to get into it so I can start learning with the PocketDroid Go example if anyone knows that one... Please help it's been days and I am getting nowhere and it's literally step one: "open the package!" :(
Problem solved - Unity changed the name of ARBackgroundRenderer to ARCamera in like 2019 or something but Mapbox have never updated their SDK, hence the errors. If you use the April 2018 version of Unity, it works.
Have you tried using unity Unity 2017.1.0 instead of 2020.3.32f1? Their examples seem to be using that version of the editor.

Errors when build unity proejct for Macos on Windows

When I want to build a macOS version of my Unity project, I get following errors. But When I choose to Build Winows Version, it goes very well. Can someone help with this problem?
Many Thanks.
My version of Unity package is 2020.3.18f1c1 and my computer is Windows
enter image description here
Library\PackageCache\com.unity.ugui#1.0.0\Runtime\UI\Core\Image.cs(873,87): error CS1061: 'Sprite' does not contain a definition for 'isUsingPlaceholder' and no accessible extension method 'isUsingPlaceholder' accepting a first argument of type 'Sprite' could be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.unity.ugui#1.0.0\Runtime\UI\Core\Image.cs(1851,38): error CS1061: 'SpriteAtlas' does not contain a definition for 'IsPlaceholder' and no accessible extension method 'IsPlaceholder' accepting a first argument of type 'SpriteAtlas' could be found (are you missing a using directive or an assembly reference?)
It would work fine after upgrading your unity engine to 2021.3 in your situation

Am I doing something wrong with importing Oculus Integration in Unity?

When I go to the Asset Store in Unity and import the Oculus Integration I get 63 error messages.
I have tried re-installing Unity, it didn't work. I can't find anyone else having similar issues.
Error Messages:
Assets\Oculus\VR\Scripts\Util\OVRCursor.cs(22,19): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Assets\Oculus\VR\Scripts\Util\OVRInputModule.cs(25,35): error CS0246: The type or namespace name 'PointerInputModule' could not be found (are you missing a using directive or an assembly reference?)
Assets\Oculus\VR\Scripts\Util\OVRInputModule.cs(432,40): error CS0246: The type or namespace name 'MouseState' could not be found (are you missing a using directive or an assembly reference?)
There is many more like this, suggesting files are missing.
Unity Version 2019.3.0a3
Ok, this solves this problem, but either there is something wrong with Unity (tested 2019.2.0b4, 2019.1.4f1, and the 2019.3 versions) or Oculus Integration.
Add and a reference to Unity.ugui in Unity like in the picture.
I encountered a couple of compiler error as well, but those could just be commented as it was in sample code.
Make sure you run Unity Hub with administration rights and import Oculus Integration again
All VR components were renamed to XR.
Just double click on the errors and replace the lines of the Using statement with XR
e.g.
OVRTracker.cs
using VR = UnityEngine.VR;
// is changed to
using XR = UnityEngine.XR;
And the error will disappear.
I replaced VR with XR and it worked for everything except one boundary error.

Facing Issue When I build the MixedRealityToolkit-Unity (V2) sample project

I am facing issue when I build the MixedRealityToolkit-Unity(V2) sample project,I faced the following error :
Assets\MixedRealityToolkit.Providers\WindowsMixedReality\WindowsMixedRealityArticulatedHand.cs(418,73): error CS0246: The type or namespace name 'HandJointKind' could not be found (are you missing a using directive or an assembly reference?)
Assets\MixedRealityToolkit.Providers\WindowsMixedReality\WindowsMixedRealityArticulatedHand.cs(111,17): error CS0246: The type or namespace name 'HandMeshObserver' could not be found (are you missing a using directive or an assembly reference?)
Assets\MixedRealityToolkit.Providers\WindowsMixedReality\WindowsMixedRealityArticulatedHand.cs(382,33): error CS0246: The type or namespace name 'HandJointKind' could not be found (are you missing a using directive or an assembly reference?)
Assets\MixedRealityToolkit.Providers\WindowsMixedReality\WindowsMixedRealityArticulatedHand.cs(412,26): error CS0246: The type or namespace name 'JointPose' could not be found (are you missing a using directive or an assembly reference?)
I am running on Windows 10 Insider preview with
OS build : 18362.30
Version : 1903
Also I double checked with build setting
Minimum SDK is 10.0.10240.0
Target SDK version is “Latest installed”
I am using mrtk_development branch for the MixedRealityToolkit-Unity.
Can any one help me or guide me if I am missing any steps here for the set-up.
Thanks.
These errors look like Unity is actually not using the latest installed SDK. Have you tried the following:
Restart your computer (not kidding).
Delete your old Build/UWP folder.
Delete Unity's Library folder (under YourProject/Library).
Re-open Unity, and try to build again.
Finally I am able to build MRTK-V2 into HoloLens :-) Just give it a try by adding Windows SDK 18362+ which is mention on Toolkit home page.
I thought I am running under insider build 18362.30 so I don't need to install this SDK, But seem like it is required anyway.