New answers tagged

1

If you try to use a variable or something that is null, Unity will print an Error to its console saying something along the lines of: "Object reference not set to instance of an object" At which point Unity will breaks out of the method it is running and the exception is passed to the calling method. What this means in practice is that if you cause an ...


1

Either you weren't seeing the error, or you were experiencing a bug. The documentation for Resources.Load says: Returns the asset at path if it can be found otherwise returns null. I'd expect you'd have a null pointer exception with the second line in your code block bullet.transform.position. Since you weren't getting a null pointer, apparently ...



Top 50 recent answers are included