04-09-2016, 02:26 AM
Good evening!
I'm just beginning with Curvy (and loving it so far), but I found a bug in the CurvyCamController example. Okay, maybe it's not a bug because it's in an example, but I think a lot of people will try (as I did) to reuse the script in a project.
In the OnPreRender() method, there is this code:
That's fine if a DepthOfField effect is desired, but if that component isn't on the camera, then this throws a null pointer exception every frame. May I suggest wrapping that in a conditional to avoid the null error?
I'm just beginning with Curvy (and loving it so far), but I found a bug in the CurvyCamController example. Okay, maybe it's not a bug because it's in an example, but I think a lot of people will try (as I did) to reuse the script in a project.
In the OnPreRender() method, there is this code:
Code:
FX_DOF.aperture = Mathf.Lerp(....);
That's fine if a DepthOfField effect is desired, but if that component isn't on the camera, then this throws a null pointer exception every frame. May I suggest wrapping that in a conditional to avoid the null error?