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

Builds fail due to compile errors while UniRecast is in the project #10

Open
emrys90 opened this issue Oct 16, 2024 · 6 comments
Open

Comments

@emrys90
Copy link

emrys90 commented Oct 16, 2024

It throws the following errors:

Library\PackageCache\com.ikpil.unirecast@a495ad8ffd47\Runtime\UniRecast.Core\TerrainObjExporter.cs(27,23): error CS0246: The type or namespace name 'EditorWindow' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.ikpil.unirecast@a495ad8ffd47\Runtime\UniRecast.Core\TerrainObjExporter.cs(40,6): error CS0246: The type or namespace name 'MenuItemAttribute' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.ikpil.unirecast@a495ad8ffd47\Runtime\UniRecast.Core\TerrainObjExporter.cs(40,6): error CS0246: The type or namespace name 'MenuItem' could not be found (are you missing a using directive or an assembly reference?)
@ikpil
Copy link
Owner

ikpil commented Oct 18, 2024

93850af - [upstream] 1bf2ff4 - Changed bmin/bmax from float[] to RcVec2f for improved memory efficiency and readability

image

@emrys90
Copy link
Author

emrys90 commented Oct 18, 2024

@ikpil Did you comment on the wrong issue by chance? I don't see anything in that commit related to fixing TerrainObjExporter.

@ikpil
Copy link
Owner

ikpil commented Oct 19, 2024

image

@ikpil
Copy link
Owner

ikpil commented Oct 19, 2024

I'm sorry for the delayed response; I'm not a full-time open source developer, so I appreciate your patience.

Could you try uninstalling and then reinstalling the UniRecast package? It should install as version 0.0.13 without any issues.

If you still encounter problems, please let me know which version of Unity you are using.

@emrys90
Copy link
Author

emrys90 commented Oct 19, 2024

No worries, I understand.

This isn't an issue with a specific Unity version. I assume you're unfamiliar with Unity? I apologize if that assumption is wrong.

So the issue is that TerrainObjExporter has editor code in it, but its in a runtime filepath. You won't notice this compiler error just running it in the editor like your screenshots, you have to do an actual standalone build to run into this issue.

There's two ways to fix this. TerrainObjExporter can be moved to an Editor only folder, or you can wrap editor only code in #if UNITY_EDITOR.

ikpil added a commit that referenced this issue Oct 27, 2024
@ikpil
Copy link
Owner

ikpil commented Oct 27, 2024

@emrys90 thank you!! fix!!

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