Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development

Josh Minor
Josh Minor
2,947 Points

IsFinite(outDistanceForSort)

Still getting this error, any help would be appreciated.

3 Answers

Gavin Ralston
Gavin Ralston
28,770 Points

It's a bug in the unity engine. If you go into the Hierarchy, open the Environment section, select WaterProDaytime and uncheck the following box in the Inspector, it should remove all of the messages:

Hierarchy Window view

Inspector Pane view

Just uncheck that box to the left of the name field.

Here's a bug tracker issue you can subscribe to if you want to see when it's fixed so you can patch it.

Encountered the same error, After a little bit of removing things slowly to find out which line cause the issue, they are caused by instantiation of a new prefab for the particle effect. Comment out the Instantiate(pickupPrefab, transform.position, Quaternion.identity); line in FlyPickup script and the Instantiate (pickupPrefab, transform.position, Quaternion.identity); line in PlayerHealth script would remove the error message from the console and improve your FPS.

I think instantiate a new Prefab object and then remove it later after the animation finish playing is not a really good way to display Particle Effect.

I got the same error. You should change your QualitySettings from High Quality to Low Quality (Edit -> Project Settings -> Quality) After this the errors disappeared for me.