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

Probuilder meshes are stored in scene file #109

Closed
ElmarJ opened this issue Jan 9, 2022 · 4 comments
Closed

Probuilder meshes are stored in scene file #109

ElmarJ opened this issue Jan 9, 2022 · 4 comments
Labels
architecture Work on architecture, code quality and performance bug Something isn't working deployment Work on building and distribution research Experimentation and study work, to determine future steps (no pre-set outcome)
Milestone

Comments

@ElmarJ
Copy link
Owner

ElmarJ commented Jan 9, 2022

Even though all buildings and other city-elements reside in (single instance) prefabs, there are still details about all the buildings in the main MainScene file. Specifically, all the probuilder meshes remain stored in the Prefab, even after applying overrides to the prefab.

The prevents the code from being truly modularized over different files, and more specifically messes up git merge as it is almost imposible to have commit that does not in some way alter the enormous and disorganized MainScene file.

More details about the underlying Probuilder bug can be found here https://issuetracker.unity3d.com/issues/probuilder-mesh-slash-mesh-collider-changes-do-not-get-applied-to-prefab and another report here https://forum.unity.com/threads/probuilder-prefab-mode.621154/

In the end it would be nice if we could ditch the probuilder dependancy altogether, right after generating the buildings. This requires solving ElmarJ/GeoJsonCityBuilder#15 .

@ElmarJ
Copy link
Owner Author

ElmarJ commented Jan 9, 2022

According to the bugtracker on Unity, this is now solved? Might be worth checking out whether a probuilder upgrade solves the issue.

@ElmarJ ElmarJ added the architecture Work on architecture, code quality and performance label Jan 9, 2022
@ElmarJ ElmarJ added this to the v2.3 milestone Jan 9, 2022
@ElmarJ
Copy link
Owner Author

ElmarJ commented Jan 9, 2022

Even after update, this problem persists. Weirdly enough, even when removing all probuilder scripts, the meshes keep being stored as overrides in the scene...

@ElmarJ ElmarJ added the bug Something isn't working label Jan 9, 2022
@ElmarJ
Copy link
Owner Author

ElmarJ commented Jan 9, 2022

Did some further research. Some points:

  1. Meshes are references to external assets, so cannot be applied to a prefab (as the mesh wouldn't be available from the prefab, it resides in the Scene).
  2. Even when generating the buildings in the prefab editor, Probuilder seems to store the data in the Scene, again creating overrides
  3. Stripping probuilder from the prefab results in missing meshes (although that is not immediatly visible in the prefab editor).

Solution might be to generate all meshes as files (export from probuilder).

@ElmarJ ElmarJ modified the milestones: v2.3, v3.0 Jun 12, 2022
@ElmarJ ElmarJ added deployment Work on building and distribution research Experimentation and study work, to determine future steps (no pre-set outcome) labels Jan 10, 2024
@ElmarJ
Copy link
Owner Author

ElmarJ commented Nov 22, 2024

Closed with f84c69d

@ElmarJ ElmarJ closed this as completed Nov 22, 2024
@ElmarJ ElmarJ modified the milestones: v3.0, v2.4 Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Work on architecture, code quality and performance bug Something isn't working deployment Work on building and distribution research Experimentation and study work, to determine future steps (no pre-set outcome)
Projects
None yet
Development

No branches or pull requests

1 participant