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

Having skinned mesh/mesh components disabled can produce incorrect results in optimized copy #15

Closed
Asovrix opened this issue Nov 3, 2022 · 2 comments

Comments

@Asovrix
Copy link

Asovrix commented Nov 3, 2022

As in title.
Apparently toggling skinned mesh/mesh components is way more performant than toggling the entire gameobject with mesh on it.
It seems though that optimizer does not seem to properly support these kind of scenarios and produces a copy where meshes are not getting enabled/disabled the same way as on input avatar.
To reproduce try to switch your gameobject toggles into skinned mesh component toggles in hierarchy and in animations, aka you toggle lower checkbox instead of upper one:
Unity_2022-11-03_15-29-04

@Asovrix
Copy link
Author

Asovrix commented Nov 3, 2022

Problem seems to occur when a gameobject where (skinned) mesh renderer is enabled gets merged to a different gameobject where renderer is disabled. Result of it is that on optimized copy that merged mesh which was disabled stays disabled and toggling it on manually doesn't yield proper results when it comes to animating parts of it on or off.

@d4rkc0d3r
Copy link
Owner

I fixed the SkinnedMeshRenderer component being disabled when other stuff get merged into it. I also changed how I save the optimized materials. Would be nice to know if that fixes it. You can get the newest version right here.

Apparently toggling skinned mesh/mesh components is way more performant than toggling the entire gameobject with mesh on it.

Yes technically it is. However if you use the optimizer you won't have either of those toggles left over so it doesn't matter in this case. Also unless you toggle your meshes rapidly this is also a non issue.

@Asovrix Asovrix closed this as completed Feb 13, 2023
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