Author Topic: [RESOLVED] Atlas Inspector Bug  (Read 2834 times)

matanuki

  • Guest
[RESOLVED] Atlas Inspector Bug
« on: November 20, 2012, 11:23:39 AM »
Hey, so I was running into the same issue as this thread--specifically, I couldn't edit the borders of sprites in the Atlas Inspector.  Applying the fix posted here resolved that issue, however it created a much more serious one.

Immediately after editing the atlas prefab, Unity began to spit out asserts every few seconds including !IsFinite(outDistanceForSort) among other similar errors, and the stack trace claims they are coming from C:/BuildAgent/.../Editor/MonoGenerated/Editor/EditorHandles.cs.  When run, the game starts to error several hundred times a second and drops the framerate to single digits.  I confirmed that it is the atlas prefab by reverting, then editing it again; same effect.  The errors start the second I change the border value for any sprite within the inspector.

Any ideas?  Since I haven't been able to apply borders to any tiling sprites, my workaround thus far has been to maintain a second atlas set to Point filtering, then composite tiled and sliced sprites with Z-positioning.  It's a nightmare.

Edit: the only information I could find on the Editor errors is several years old, and pertains to a camera or object somehow getting positioned out of bounds (which causes Unity to flag its position as infinite).
« Last Edit: November 20, 2012, 12:47:49 PM by matanuki »

matanuki

  • Guest
Re: Atlas Inspector Bug-- 9/18/12 fix causes errors in Editor
« Reply #1 on: November 20, 2012, 12:47:18 PM »
UPDATE: I figured it out.  In some of my prefabs, I was mirroring sprites by applying a negative scale.  This usually works fine, however if a border is applied to this sprite it will cause the issue listed above.

The solution is to flip sprites by altering their rotation rather than their scale.