Voltaia
Voltaia2mo ago

Is anyone else having problems with intellisense and syntax highlighting?

I currently suspect it has something to do with Normcore's auto-compile feature for custom models. Like, somehow it is interfering with visual studio's text parsing. My issues could also be unrelated to Normcore, but I wanted to see if anyone else was having similar problems before troubleshooting. The only other major package I have installed is XR Toolit.
14 Replies
kapa.ai
kapa.ai2mo ago
Hi @Voltaia. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information about issues with intellisense and syntax highlighting related to Normcore's auto-compile feature for custom models. However, if you suspect that the issue might be related to Normcore, I would recommend reaching out to the Normcore community on their Discord (https://normcore.io/discord) channel. They might be able to provide more insights or share if they have experienced similar issues. If the problem persists, it might be helpful to isolate the issue by disabling other packages like XR Toolkit temporarily and see if the problem still exists. This could help you determine if the issue is specifically related to Normcore or not. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@276154194606424064> kapa.ai is still learning and improving, please let us know how it did by reacting below
Voltaia
Voltaia2mo ago
Here's an example of the syntax highlighting acting weird.
No description
Voltaia
Voltaia2mo ago
And yeah, if I comment out the class of my model, syntax highlighting goes back to normal. I suspect auto-complete also begins to work again. It doesn't just effect areas where I access the model, but also other scripts as well, which has been making it a frustrating problem. I bet if I used assembly definitions it would isolate its effect. I'm unsure if this editor warning has anything to do with it:
Warning CS8032 An instance of analyzer Unity.Properties.SourceGenerator.PropertyBagGenerator cannot be created from C:\Program Files\Unity\Hub\Editor\2022.3.27f1\Editor\Data\Tools\Unity.SourceGenerators\Unity.Properties.SourceGenerator.dll: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.. Assembly-CSharp
NormalMark
NormalMark2mo ago
Normcore uses the C# source generators feature to generate the additional code for models. They're generally well supported by IDEs like Visual Studio and Rider. You can see if the IDE is recognizing the source generator by checking if there's entries that match your model classes. Under the assembly of the model class > References > Analyzers > and so on (screenshot). What does it look like on your end?
No description
NormalMark
NormalMark2mo ago
I'm on Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.9.7 The Unity.Properties.SourceGenerator.PropertyBagGenerator error is a bit of a mystery: https://discussions.unity.com/t/visual-studio-2022-cs8032-an-instance-of-analyzer-unity-properties-sourcegenerator-propertybaggenerator-cannot-be-created-from-sourcegenerator-dll/354264 Seeing how it's related to source generators, it's possible that it has the same root cause as the RealtimeModel issue. But I'm not sure what it could be.
Voltaia
Voltaia2mo ago
I'm using 2019 16.11.34 but I have 2022 installed so I'll give that a shot. I didn't realize my version needs an update as well, so I'll kick that into action.
No description
Voltaia
Voltaia2mo ago
Should I see a Normal.Meta.XR solution in my explorer?
NormalMark
NormalMark2mo ago
No I just happened to have that project open and I knew this assembly contained RealtimeModel classes. Any assembly that has models should be good, including the default Assembly-CSharp one.
Voltaia
Voltaia2mo ago
Ah I misunderstood you before, I'll look into that warning. Also, looks like I'm not getting source file generation?
No description
Voltaia
Voltaia2mo ago
Or at least not a reference to it? Not really sure how this all works. My model works fine though. I'm not getting that warning in 2022 though (so far) so perhaps they are not related? But also right now syntax highlighting and auto-complete is working, so I'm unsure of what to think
NormalMark
NormalMark2mo ago
I think it's likely the newer version of Visual Studio solved it
NormalMark
NormalMark2mo ago
Here's a more complete example on my side. This is only useful if you want to inspect the generated code or troubleshoot something related to source generators. So if things are working well now I think you can ignore this References > Analyzers thing that I brought up.
No description
Voltaia
Voltaia4w ago
Yeah, thus far on the new VS version no warnings. Sorry for the bother, should've updated before asking! You guys are super helpful as always.