Closed hybridherbst closed 4 years ago
Hi @soraryu ! I just wanted to let you know that I know about your issues and PRs, but I haven't yet had enough time to properly go through and review or reply yet. I hope that I can get some time this weekend. Sorry for the wait!
Hi @Whinarn , any news? :)
Hi @soraryu! Sorry I have been busy preparing for moving between countries and have forgotten about your pull requests. I will look through them now.
Despite what mesh.isReadable says, meshes are always readable in Editor Mode and readable in Play Mode when accessed from an Editor Script (not through game logic - see https://docs.unity3d.com/ScriptReference/Mesh-isReadable.html).
This PR addresses that; unfortunately some of the functionality is hidden behind reflection and not exposed in Unity.
I mostly copied the code from my other PR here that fixed the same thing on a Unity project: https://github.com/Unity-Technologies/usd-unity-sdk/pull/123 - this also contains some of the reasoning behind this and why the reflection is necessary.
Long story short: this PR allows to generate LODs from the LODGeneratorHelper even if mesh.isReadable is false.