Friday, May 27, 2016

Unity Issues

I've been using Unity for over 6 years.  While it has many aspects that I love, no engine is without issues.  Over the years, I've encountered many of these issues, some of which I've found workarounds for.  Several times now, someone will ask me, "Didn't you encounter this issue?  How did you solve it?"  And I'll usually answer, "Yeah, I've encountered that, but I don't remember the details".  What follows is my list of Unity issues.  I'll try to keep it up to date as best I can for issues I encounter, as well as provide any workarounds I come up with.

Issue #1: No adjacency information in geometry shaders
You cannot construct a mesh filled with adjacency information, which is incredibly useful for many things.
Workaround: None

Issue #2: Frustum culling cannot be disabled
Let's say you have an object that has it's vertices displaced in a shader.  If the object is outside the view frustum and the displacement places the vertices inside the frustum, Unity won't render it.

Another example: If you have created a mesh consisting of screenspace/viewspace vertices, Unity won't render that mesh unless the containing object is inside the view frustum.

It would be great to be able to disabled frustum culling on specific objects, or even disable it entirely, but there is no such ability.

Workaround: Change camera view angle.  Change object bounds. Change object position temporarily.

Issue #3: Generic ReflectionTypeLoadException error
This error is incredibly frustrating, especially when you are dealing with a lot of DLLs.  This error can occur for many reasons, and Unity never gives you any details inside the Editor.

- It could mean that you're missing a DLL.  Dig through the editor log file to try to figure out what.
- It could mean a DLL targets the wrong .NET version (> 3.5).  Which DLL?  Who knows.

Workaround: Scour through the editor log to find any info to help.  Good luck trying to support a giant team of developers.  You basically have to have them email you the log file.

No comments: