Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'uWindowCapture' could not be found (are you missing a using directive or an assembly reference?) #41

Closed
jasonhbartlett opened this issue Dec 1, 2021 · 6 comments

Comments

@jasonhbartlett
Copy link

Hello, I added uWindowCapture package via UPM git url. I'm wanting to reference the classes from the uWindowCapture namespace in my own scripts but after adding the #using uWindowCapture; I'm getting the following error:

error CS0246: The type or namespace name 'uWindowCapture' could not be found (are you missing a using directive or an assembly reference?)

@jasonhbartlett
Copy link
Author

I don't know if perhaps this is due to duplicate assembly names where the plugins are named uWindowCapture and the ASDF file in Runtime folder is also named uWindowCapture.

I notice in the uDesktopDuplication package, you have named the ASDF in the runtime folder uDesktopDuplication.Runtime

Perhaps renaming the ASDF to uWindowCapture.Runtime will fix it, but I cannot do that as it's part of the package.

@jasonhbartlett
Copy link
Author

@hecomi Can you confirm this issue isn't something on my end? I will take suggestions if you have any.

@hecomi
Copy link
Owner

hecomi commented Dec 6, 2021

Please try to check this and click "Regenerate project filters" in Edit > Preferences > External Tools:

image

@jasonhbartlett
Copy link
Author

jasonhbartlett commented Dec 6, 2021

Hi @hecomi ,
Doing that by itself doesn't seem to work. But by also changing the uWindowCapture.asmdef "autoReferenced":true, and then Re-importing it - Then it DOES work.

Same for the Samples. I have to set Auto Referenced to True and re-import, then I am able to reference the public methods.

Did you not want the asmdef file for uWindowCapture to be auto referenced? I notice uDesktopDuplication asmdef file has auto referenced set to True. I had no problem with that package regarding the references. What is the difference between the 2 packages regarding references?

Edit: Just FYI - If I just set Auto Referenced to True and re-import, this solves the issue. Don't need to checkmark added for RegistryPackages.

@hecomi
Copy link
Owner

hecomi commented Dec 9, 2021

Thanks for the report, it is a mistake that Auto Referenced is false. I'll check it when I have time on the weekend.

@hecomi
Copy link
Owner

hecomi commented Dec 12, 2021

This problem was fixed in v1.1.2:

@hecomi hecomi closed this as completed Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants