Skip to content

Conversation

@Zallist
Copy link

@Zallist Zallist commented Sep 24, 2022

Added [Experimental] warning to SaveMeshesInScene since it doesn't seem to work 100% of the time. Also reversed the checkbox logic so it's something that's being ENABLED rather than being DISABLED.

Thank gawi.#0145 for letting me know that it DOES have problems. Since I've been using it for 3 months and had none, but seemingly it acts weirdly (doesn't always regenerate the meshes). This MIGHT be due to them running on Unity 2020.3. Haven't had chance to investigate.

Flipping the toggle does make sense regardless, for the sake of UX. Enabling a feature rather than disabling the default.

…em to work 100% of the time. Also reversed the checkbox logic so it's something that's being ENABLED rather than being DISABLED.
@Zallist
Copy link
Author

Zallist commented Sep 24, 2022

Had to recreate the pull request since the previous one got killed by my branch rename

… Playmode. Done by not removing the CSG components OnBuild.
@Zallist
Copy link
Author

Zallist commented Sep 24, 2022

Added an extra commit to attempt to fix the Playmode usability of the new option. Basically, don't remove any CSGnodes if the option is enabled.

…ce.SaveMeshesInSceneFiles is off, instead just hide them
…eMeshesInSceneFiles option was turned off. We now make sure that External is populated on entering playmode, and force the meshes to check that they have been rebuilt.
@Zallist
Copy link
Author

Zallist commented Sep 24, 2022

Think I've gotten to the bottom of the strangeness with this feature now.

  1. When changing scenes during playmode it couldn't rebuild the meshes because sceneLoaded was called after OnPostProcessScene which meant the CSG nodes didn't exist anymore to DO the rebuild with.
  2. When doing the rebuild itself, if Hot Reloading was on or triggered, External never got repopulated. So it couldn't actually rebuild the meshes.

@Zallist Zallist changed the title Added [Experimental] warning to SaveMeshesInScene Added [Experimental] warning to SaveMeshesInScene, along with additional fixes to make it less likely to break Sep 24, 2022
@Gawidev
Copy link

Gawidev commented Sep 25, 2022

Tested and working on 2020.3 and 2021.3

@nukeandbeans nukeandbeans merged commit 5b0e8d3 into nukeandbeans:bugfixes Sep 30, 2022
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

Successfully merging this pull request may close these issues.

3 participants