Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Null reference exception in CurvyCamController
#1
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:

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? Smile
Reply


Messages In This Thread
Null reference exception in CurvyCamController - by syscrusher - 04-09-2016, 02:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting reference to Generator and InputSplinePath Spline velikizlivuk 3 9 08-15-2023, 11:08 PM
Last Post: velikizlivuk
Bug Argument Null exception Beqo77 5 17 04-24-2023, 08:26 PM
Last Post: _Aka_
  Null Ref when using Connections RKTRAINS 1 2 10-10-2022, 08:49 AM
Last Post: _Aka_
  Curvy Generator Exception niek352 2 11 07-14-2022, 02:59 PM
Last Post: niek352

Forum Jump: