Author Topic: !IsFinite errors thrown by Editor  (Read 7929 times)

sybixsus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
!IsFinite errors thrown by Editor
« on: October 04, 2012, 01:18:49 PM »
I'm getting a lot of Unity Editor errors thrown whenever I try to work with one of your sliced sprites. The sliced sprite in question is 1720 x 250 - more or less. The vertical scale goes up a bit more sometimes, but it's in that region. When I use a simple tween script to adjust the scale of the object to make it appear and disappear, I get these errors thrown:

!IsFinite(outDistanceForSort)
!IsFinite(outDistanceAlongView)

They are repeated a number of times, but those are the only two different errors.

I'm guessing that something in your editor scripts is trying to calculate something and ends up with a NAN, thus throwing the Editor error.

I've searched the forum and didn't find much. I found two threads which said Unity doesn't like the very large scales that NGUI encourages us to use. So I cut my virtual resolution down by 1/4, but the errors are still there. I also found some references suggesting that NGUI doesn't like negative scales, but I don't have anything scaled to a negative number, so I don't think that's it.

Bronco78th

  • Guest
Re: !IsFinite errors thrown by Editor
« Reply #1 on: October 04, 2012, 05:12:54 PM »
IM getting the same errors but its becuase of my set-up im sure.

Im trying to make a chat type box using UITextList. However in Example 12 of Ngui I can't figure out what type of object 'Text List' acturally is.

On my own version If I use a regular Unity gameobject and attach a collider and the UITextList script to it, then add a slicedsprites (to make the chatbox Background) as a child of the Gameobject, it will also throw these errors and the scale of sliced spritegoes completely wrong.

This error only seems to happen with sliced sprites. The scales are way off if I add any sprite as a child of the game object. But the error only occurs with the slicedsprites.

John

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: !IsFinite errors thrown by Editor
« Reply #2 on: October 05, 2012, 08:39:47 AM »
This particular error is thrown when you set the scale of some sliced sprite to be negative, like -100, 100, 1. Just don't do it. :)