Unity 2021 Indexbuffer fix
Spongert opened this issue Β· comments
I wanted to try to make a commit and pull request, but don't think I can (don't use Github that much π)
Anyway, the conditionals need to have Unity 2021 included to make 32bit indices work, in that version. Otherwise, large meshes become a garbage. With it, it works perfect :-).
So in MeshUtils.cs:
#if UNITY_2018_2 || UNITY_2018_3 || UNITY_2018_4 || UNITY_2019 || UNITY_2020 || UNITY_2021
#define UNITY_8UV_SUPPORT
#endif
#if UNITY_2017_3 || UNITY_2017_4 || UNITY_2018 || UNITY_2019 || UNITY_2020 || UNITY_2021
#define UNITY_MESH_INDEXFORMAT_SUPPORT
#endif
Hi @Whinarn, I tried that but ran in some permission errors - but maybe I should experiment with forks using a private repository. Thanks for making the change already!
And I was going to suggest the same, to work the other way around (excluding 5.6 and earlier) but didn't want to sound too much of a critic, as UnityMeshSimplifier seems to work really well!
I just merged out my fix. So a new release should be ready any minute now.