Unity + Leap Motion: error CS0246 (namespace) issue - c#

We have a Unity 5 program running well with Oculus Rift + Leap Motion on a Windows 7 computer. We tried to have the same program running on another computer with Windows 10, but these following errors showed up.
Could any of you provide some suggestions? Thanks a lot! (ps. Oculus Rift and Leap Motion are running well on the Win10 computer with a separate Unity project: the package called "Core Assets" from Leap Motion that shows both Oculus and Leap Motion connections.)
Thanks!
The error messages in Unity are:
Assets/LeapMotion/Scripts/Hands/DebugFinger.cs(14,28): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?
Assets/LeapMotion/Scripts/Hands/PolyFinger.cs(13,27): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?
Assets/LeapMotion/Scripts/Hands/PolyHand.cs(17,25): error CS0246: The type or namespace name `HandModel' could not be found. Are you missing a using directive or an assembly reference?
Assets/LeapMotion/Scripts/Hands/RiggedFinger.cs(17,29): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?
Assets/LeapMotion/Scripts/Hands/RiggedHand.cs(12,27): error CS0246: The type or namespace name `HandModel' could not be found. Are you missing a using directive or an assembly reference?

The error messages pretty much sum it up: these classes are not present in your project. It seems unlikely that the project on the Win 7 computer is exactly the same as the project on the Win 10 computer -- these are compile errors after all. My guess is that you are using an earlier version of the Leap Motion assets on the computer that works and the Orion version on the other computer. None of the classes shown in the error messages are included in the newer, Orion assets. (Even if you upgraded the assets on the Win 7 computer, it may still contain the older files, and classes that depend on them.)

The problem is that Leap Motion company made a mistake releasing the Unity SDK. They build it in the wrong framework. You may be able to run the project in unity but not to debug it with Visual Studio.
The company said that they will release an update of the SDK without any problems, we'll have to wait. Until that moment you can keep coding and use the Debug.Log function to debug at real time.
You can find more info in here:
https://community.leapmotion.com/t/cannot-compile-unity-c-script-if-i-use-leap-motion-orion-4-1-3/5514

Related

In my Unity project I am facing an unknown error and error of loading library files

when I load my unity project it is showing me the 2 errors because of which I can't run my project. The errors are:
Unknown error occurred while loading 'Library/Artifacts/22/22ec59139bb4d4489ae56859248015ff'.
...and:
Library\PackageCache\com.unity.test-framework#1.1.29\UnityEngine.TestRunner\NUnitExtensions\Runner\TestCommandBuilder.cs(65,31): error CS0246: The type or namespace name 'ImmediateEnumerableCommand' could not be found (are you missing a using directive or an assembly reference?).
If anybody will help me to understand these issues.
I am using unity version 2021.1.25f1 and editor for C# script is visual studio 2022
This would occur when the version of your com.unity.test-framework package does not match the version of Unity editor you are using. Basically, there is a mismatch somewhere. I recommend going to your Windows > Asset Manager editor window, find all test related packages, and try to update them or uninstall/reinstall.
The most common cause for this issue is when someone upgrades the version of Unity that they are using (or downgrades), but doesn't go to check the compatibility of existing packages with the new Unity version. It can happen for other reasons, so I am not saying for sure that you changed Unity versions. But more often than not, this will fix your issue.

The type or namespace name 'ARSubsystemManager' does not exist in the namespace 'UnityEngine.XR'

I have been following the example from:
https://github.com/shaqian/TF-Unity-ARFoundation
try to make an AR-ML android application, however there are some errors.
I solved some of them but this one keep appearing:
Assets\Scripts\CameraConfigController.cs(4,22): error CS0234: The type or namespace name 'ARSubsystemManager' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
The project included follow packages:
AR Foundation 4.17
AR Subsystems 4.17
ARCore XR Plugin 4.17
ARCore Extensions 1.25.0
What can I do to fix the error?
The GitHub you are using has been updated last 2 years ago. It's probably a Unity version issue, I dont know which unity version you are using but I expect you need a 2017 or 2018 versions.
XR has changed a lot over the last years so a lot is deprecated.

How to solve C# reference errors for Watson Unity SDK in Unity?

This is my first Unity project and since I know a bit about Watson, I thought I would start with that.
But when I create a new project and import the Watson Unity SDK assets into the Mono environment I get errors like :
Assets\unity-sdk-core-0.2.0\unity-sdk-core-0.2.0\Utilities\FrameRateCounter.cs(20,19): error CS0234: The type or namespace name 'UI' does not exist in the
namespace 'UnityEngine' (are you missing an assembly reference?)
When I create a new C# script in the scenes folder, the assembly reference for UnityEngine.UI can be found.
When I open the FrameRateCounter.cs file in Visual Studio, I don't get this message.
I am running version 2019.3.0a3 Personal of Unity

Unity 3D FPS Character Error

I am making a game and I just wanted to walk around the terrain using the Standard Asset FPS First person camera character. however, when I place it on unity it gives me this errors
1.) Assets/Standard Assets/Utility/PlatformSpecificContent.cs(15,23): error CS0234: The type or namespace name Build does not exist in the namespace UnityEditor. Are you missing an assembly reference?
2.) Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs(13,23): error CS0234: The type or namespace name Build does not exist in the namespace UnityEditor. Are you missing an assembly reference?
I have no idea what they mean, can someone give me a clue?
I am using Unity 5.4 personal.
Thank you in afdvance.
The package Build was introduced to the UnityEditor namespace in version 5.6. You will need to change those references, or much more easily, update your Unity version to at least 5.6.

iOS Run errors s Xamarin Live Player and Hanselman.Forms

I created an app based off the Hanselman Forms app. I'm trying to get it to run with the new Xamarin iOS Live Player and i'm getting runtime build errors.
To make sure it wasn't something i broke i did a fresh install of Hanselman Forms and Visual Studio 2017 Preview and connected the iPhone live player.
The build compiles fine with VS.
Trying to run the debug app with Live Player on iPhone gives the following errors.
The following errors were encountered when building and running your app:
• TweetStore.cs: The type or namespace name 'ITweetStore' could not be found (are you missing a using directive or an assembly reference?)
• TweetStore.cs: The type or namespace name 'Tweet' does not exist in the namespace 'Hanselman.Portable' (are you missing an assembly reference?)
• LaunchTwitter.cs: The type or namespace name 'ILaunchTwitter' could not be found (are you missing a using directive or an assembly reference?)
• AppDelegate.cs: The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)
OK
The packets have been refreshed.
I've removed the bin/obj files to do a fresh build.
I've removed the reference, built clean, got similar errors in VS, added the reference back in and the VS build succeeds.
Android works fine.
Any ideas as to what i'm missing?
This is a known issue and is being worked on by the Xamarin folks.
Details at the following link. https://forums.xamarin.com/discussion/95825/ios-run-time-errors-type-or-namespace-name-not-found-with-xamarin-live-player-and-hanselman-forms/p1?new=1
Check that you have selected a Startup Project that matches your device type (iOS or Android) and that the configuration matches that device type (eg. Debug|iPhone Simulator for iOS).

Categories