When I run scene optimizer I get an error “positions are required” which is thrown when the vertexdata doesn’t have positions.
I found references on the forums here:
But it talks about an empty grid and I’m not sure if it is completely related.
And on git here:
It is marked as closed but multiple devs are still experiencing the issue post adding the check for isDisposed.
I am not sure what object is causing it in my scene but I am wondering if a simple fix would be to check in _canBeMerged if the mesh’s vertexdata has a position and return false if not. That way at least the optimization continues and just ignores that object rather than throwing an exception (and I assume stopping the optimization).
My expectation would be that it would optimize what it can and ignore what it can’t. Instead, it throws an exception saying “Positions are required” and doesn’t complete any of the optimizations listed because the exception is not caught.
I would think the solution would be either to check to make sure the mesh can be merged during ‘_canBeMerged’ so in this case check to see if it has positions. Or it could at least catch the exception and move onto the next mesh (if possible) or next optimization option (if the mesh optimization needs to be aborted).
Or if I am missing something and this shouldn’t be run until the scene is setup differently so that datakinds are the same or whatever then the documentation should be updated and the error message as well.