Here are the details of the issue I am experiencing.
Issue category: ARDK / Unity Package
Host machine & OS version: Windows
Issue Environment : Unity Editor / Visual Studio
Visual Studio version: Microsoft Visual Studio Community 2022 17.2.2
ARDK version: ARDK 2.0.0
Unity version: Unity 2020.3.34f1
Description of the issue:
Since I updated my Unity project to ARDK 2.0.0, I’m getting errors when trying to compile with Visual (for debugging purposes). These errors are mainly in the ArdkTelemetry.cs file and the Google namespace.
I have not been able to find a solution so far on my own or on the forum.
When you updated your project to 2.0, how did you go about doing it? Did you delete all your old 1.3 files? If not this could be what is causing your project to malfunction.
Here is what you need to do. You must delete the ARDK folder, and the ARDKExamples folder, The ARDKMockEnvironments folder, and the MockMeshes folder. That should allow you to make a complete upgrade. You might also want to try updating to Unity 2021.3.3f1. Let us know if these suggestions work for you.
I deleted the ARDK folders from my project, deleted the Library folder and updated my project to Unity 2021.3.4f1. Unfortunately, I still have the same errors.
FWIW I’m having the same issue trying to attach VS Debugger to the Unity Editor. I can build fine, but while I see the relevant Google libraries in the project, and iirc I can navigate to definitions via intellisense, VS refuses to acknowledge the Google namespace when I try to Attach, which cascades into dozens of other issues.
Unity 2021.1.3f1
ARDK 2.0.0 (new project, never used anything earlier)
VS is 2019 (16.11.13) which might plausibly be contributing.
Severity
Code
Description
Project
File
Line
Suppression State
Error
CS0246
The type or namespace name ‘Google’ could not be found (are you missing a using directive or an assembly reference?)
I appreciate your prompt response! We’re still researching a way to resolve this issue. Thank you again for your patience. I’ll be sure to reach out once we have more information.
Also @NNDev, Thank you for providing additional information as well!
I’m here to check on the current topic. Have you found the origin of the errors? My presentation is suspended until I receive your feedback following your analysis.
I wanted to give you a quick update. A bug report has been filed and we are continuing to look into this issue. As soon as we have an update we will be sure to let you know!
Thank you for reaching out and sorry to hear you’re also experiencing this issue. We don’t currently have an archive for previous ARDK versions publicly available. Also, from what I understand you should still be able to compile and build in unity. Is there a reason that you need it to compile in visual studio? I know there are some tools that are specific to vs, is this the reason or is it something else? More information can help us to know if this issue needs to be escalated further.
Hi all,
I think I’m a little bit confused on what the core issue here is. So let me start with what I assume the goal is: How to debug a unity project on Visual Studio/Use break points for stepping through code
There are official instruction on how to do that here and here.
But in short here’s what worked for me.
Install Visual Studio and the “Game development with Unity” Workload
Open the script you want to debug and add a break point wherever you want it to be.
on the Debug Menu, select “Attach to Unity Debugger”
Select the Instance of Unity that will be running the code.
On Unity press the Play Button.
This should hit the break point and let you inspect the script as normal.
Things to note here, since Unity debugger tools are dependent on both Unity and Visual Studio, versions might change/fix things, I just tested this today with versions with no issues:
Unity 2021.3.5f1
Visual Studio Comunity 2022 (17.2.5) and Visual Studio Community 2019 (16.11.16)
Let me know if this was not the main point of the issue though. I did not reproduce the errors as I saw no need to actually build from Visual Studio (or VS Code/cmake). Or if updating to newer versions solved your issues.