microsoft / MixedRealityLearning

Projects and Artifacts to accelerate your Mixed Reality development path
MIT License
70 stars 39 forks source link

MRTK3 Learning Path - compilation errors in Unity #81

Closed chenruijia120 closed 1 year ago

chenruijia120 commented 1 year ago

Describe the bug

Hi! I got similar errors with https://learn.microsoft.com/en-us/answers/questions/1392297/i-am-getting-compilation-errors-in-unity-that-nonn. Library\PackageCache\org.mixedrealitytoolkit.uxcore@45c07beda63c\Experimental\NonNativeKeyboard\TMPInputFieldNonNativeKeyboardTrigger.cs(67,42): error CS0103: The name 'NonNativeKeyboard' does not exist in the current context

I am using Unity 2023.1.17f1 and Windows 11 22H2. I followed the instructions here: https://learn.microsoft.com/en-us/training/modules/learn-mrtk-tutorials/1-5-exercise-configure-resources. Could you please help me?

To reproduce

Steps to reproduce the behavior:

I followed the instructions here: https://learn.microsoft.com/en-us/training/modules/learn-mrtk-tutorials/1-5-exercise-configure-resources to import the package

Expected behavior

Unity cannot detect NonNativeKeyboard.cs file.

Screenshots

image image

Your setup (please complete the following information)

Target platform (please complete the following information)

AMollis commented 1 year ago

@chenruijia120 ... I've moved this issue to our Learning Path repository for MRTK3, https://github.com/microsoft/MixedRealityLearning

We'll follow-up here.

@marlenaklein-msft , can help @chenruijia120 out? Is there a step missing in the learning paths?

marlenaklein-msft commented 1 year ago

Hi @chenruijia120, is this setting up a new MRTK3 project from scratch?

I haven't been able to repro the error. Just to make sure it is not a weirdness with the library, could you try closing the Unity project and deleting the Library folder in your project?

image

Then reopen the project. If you still see the error, could you share your Packages > manifest.json file?

chenruijia120 commented 1 year ago

Thank you for your quick response! I found the problem: I accidentally installed MRTK2 and MRTK3 at the same time. It has been solved. Thanks again!

marlenaklein-msft commented 1 year ago

Great, glad you found the problem!

AMollis commented 1 year ago

Closing issue since @chenruijia120 found their error.

Projects can't have both MRTK2 and MRTK3 in the same project.

mendax1234 commented 4 months ago

Thank you for your quick response! I found the problem: I accidentally installed MRTK2 and MRTK3 at the same time. It has been solved. Thanks again!

Hi, I have run into the same issue. So, your solution is to delete MRTK2 right?

[Edited]: Solved. I have installed the Mixed Reality Toolkit ... 2.8.3 version by accident. After deleting these packages, these errors fly off!

m-1007 commented 4 months ago

Hi @mendax1234, I also have the same issue. How did you solve this issue. I am also using the 2.8.3 version. Which other version should I use to fix this issue?

mendax1234 commented 4 months ago

Hi @mendax1234, I also have the same issue. How did you solve this issue. I am also using the 2.8.3 version. Which other version should I use to fix this issue?

My solution is to use MRTK2 instead of using MRTK3.