unityexception专题

UnityException: Gizmo drawing functions can only be used in OnDrawGizmos and OnDrawGizmosSelected.

You don't have to call OnDrawGizmos() From anywhere, it is a editor function to display gizmos in the scene-view and is called automatically called!! 不能在任何地方调用 OnDrawGizmos(),这个函数是自动调用的。这个函数是编辑器函数,用来

Unity报错之UnityException: Texture ‘XXX‘ is not readable

问题 UnityException: Texture ‘img2’ is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings. 解决