- Home /
Run-Time Errors! Particle Instantiations
Hi,
I have a lot of run-time errors. I don't know exactly why they happen. It seems like, the longer I play the game and as often as I instantiate particles I will get these run time errors.
I am only getting three though:
NxRay direction not valid: must be unit vector
IsNormalized (dir)
!IsNormalized (ray.GetDirection ())
For what seems like each frame. I would like to fix them so that they don't occur at all, but I don't know how..Could anyone help?
void UpDate()
{
try
if (the errors happen)
throw exceptions
}
just an idea..
Answer by jashan · Aug 05, 2010 at 07:24 AM
Be careful - both C# and UnityScript are case sensitive (and I'm pretty sure Boo is as well). So if you write:
void UpDate()
this will not "match" the method "Update()" which is what you'd probably want.
Also, you can't just create a "catch all exception handler". What you'd usually do is look at the exact error message to find out where it's coming from. If it is coming from your code, you can double click the exception message in the console and Unity will take you to the exact location (but it's then also written in the stack trace).
If it's a "Unity error", in other words: It's not coming from your code, which seems to be the case for your errors, then it's best to file a bug report with a very simple repro project. So, you'd narrow your project down to its simplest form where it still shows this behavior. Frequently, doing that you might find out you did something wrong. So either, you'll find out what you did wrong and be able to fix it - or you'll have a good repro project for a bug report (the bug reporter is under "Help" in the menu).
Your answer
Follow this Question
Related Questions
Console Error while in editior 4 Answers
Confusing error messages, !IsNormalized and NxRay direction not valid 0 Answers
Game ruined when updated to unity 3.2 0 Answers
HELP! Most GUI Text mysteriously nudged upwards after update.. 1 Answer
moved project to new version of Unity, Weird stylehseet error 1 Answer