atteneder / DracoUnity

Draco 3D Data Compression Unity Package
Apache License 2.0
245 stars 38 forks source link

Error CS0246 #31

Closed drperpen closed 3 years ago

drperpen commented 3 years ago

Hi, I am running Unity 2020.3.4f1 on Windows 10 64-bit, and when I try to run the Installer Package I get the following errors in the console. It looks the installation fails as Draco Unity is not visible in the Package Manager nor I see anything when I open the demo Draco Unity project. These are the 2 error messages:

Assets\Scripts\DracoDemo.cs(18,7): error CS0246: The type or namespace name 'Draco' could not be found (are you missing a using directive or an assembly reference?)

Assets\Scripts\DracoDemoMeshData.cs(22,7): error CS0246: The type or namespace name 'Draco' could not be found (are you missing a using directive or an assembly reference?)

Thanks! Daniel

atteneder commented 3 years ago

It seems like the installation failed.

Are you trying to get DracoUnityDemo running? If yes, then there's no need to install DracoUnity, since it is already installed.

What does the Package Manager say?

Make sure to install version 3.2.0 for now (4.x is a preview)

What Unity version are you using?

drperpen commented 3 years ago

Thanks for your reply. I am running Unity 2020.3.4f1 on Windows 10 64-bit.

When installing version 3.2.0 (from Package Installer, from disk) I get this error message in the console:

Failed to load 'D:/Downloads/DracoUnity-3.2.0/DracoUnity-3.2.0/Runtime/Plugins/x86_64/dracoenc_unity.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture.

atteneder commented 3 years ago

Read the README.md regarding installing locally and look out for the GIT LFS section

drperpen commented 3 years ago

I installed GIT LFS on my machine and now when I open the project that had Draco 3.2.0 I see the package downgraded itself to 1.4.0

image

atteneder commented 3 years ago

According to this screenshot you don't have the local version installed, but the one from the scoped registry (hence my name's at the top). Note: this can happen when you change versions!

Click the plus icon to add the local package.json again.

To check if GIT LFS is correct now: See if the binary files (like the .dll file) is bigger than just a couple of bytes.

drperpen commented 3 years ago

I reinstalled from package.json and now I have 3.2.0 again. Git LFS is installed and initialized but this method is still not working. So I ended up downloading the .dll files manually and reinstalling 3.2.0 and now it's working.

Thanks for your help!