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

Does not show result mesh correctly in prefab mode. #52

Open
fantasyz opened this issue Apr 13, 2021 · 3 comments
Open

Does not show result mesh correctly in prefab mode. #52

fantasyz opened this issue Apr 13, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@fantasyz
Copy link

fantasyz commented Apr 13, 2021

Hello
My stages are saved in prefabs.
I could bake the mesh correctly in prefab mode but it won't show the result unless I am viewing the mesh from a normal scene with the prefab. This issue make it a little hard to evaluate mesh result right after baking. It would be very appreciated if this can be improved.

Thanks for the excellent work.

@h8man h8man self-assigned this Apr 14, 2021
@h8man
Copy link
Owner

h8man commented Apr 15, 2021

Hello @fantasyz

I confirm that it is a bug. Do you have any hints or clues how to fix it? I'm not very familiar with editor API.

@fantasyz
Copy link
Author

@h8man
I am not sure how the current result is rendered. However, the usual difference between Prefab Mode and normal scene editing is that it run within an isolated scene. If you code need to get the instance of the NavMeshSurface2d GameObject in perfab mode, it probably need to find it with PrefabStage, or otherwise you maybe getting an instance from the normal scene behind the one inside the prefab editing scene.

@h8man
Copy link
Owner

h8man commented Apr 16, 2021

Please try this package https://github.com/Unity-Technologies/NavMeshComponents - if bug is not reproduced, I can track down diff and merge with it.

@h8man h8man added the bug Something isn't working label Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants