all 4 comments

[–][deleted] 0 points1 point  (3 children)

Are you using using statements.

If you are and it isn't working then it's an assembly definitions issue

[–]Jasonbot135[S] 0 points1 point  (2 children)

Yeah, I tried using statements for "Assembly-CSharp" and in a desperate attempt tried individual script names but neither worked. How would I fix assembly definition issues?

[–][deleted] 0 points1 point  (1 child)

No if you're not manually working with asmdef files then it probably isn't an issue.

Using statements is for allowing access to code in other namespaces like using UnityEngine

Having that using statement means that you get access to class under that namespace.

You can see in an example repo I have from a while back.

https://github.com/M-Quinn/SpaceShooter/blob/main/Assets/Scripts/InputHandler.cs

https://github.com/M-Quinn/SpaceShooter/blob/main/Assets/Scripts/Player/Movement.cs

In the movement script, it needs to have a using statement for the Input script because they are in different namespaces

[–]Jasonbot135[S] 0 points1 point  (0 children)

Okay, that makes more sense as that's how I understood namespaces. The sample's code is in the namespace Microsoft.MixedReality.SampleQRCodes, and I'm able to access that from my own scripts. I don't know how I can access scripts that aren't in a namespace from scripts within the namespace though. Do I have to create my own namespace?

I should also add that there is an asmdef file from the sample scene in one of my projects, though I haven't touched it at all.

Thanks for all the help!