Page 1 of 1

NullRef exception in AmplifyMotionObject [SOLVED]

PostPosted: Sat Mar 29, 2014 7:07 pm
by any_user
I get this nullref exception when I instantiate objects with the AmplifyMotionObject script attached.

Code: Select all
NullReferenceException: Object reference not set to an instance of an object
AmplifyMotionObject.Start ()


The error appears only when there is no camera with the amplify motion effect in the scene. In my case, it happens when I start the game in batchmode for dedicated game server instance, where it doesn't create cameras.

I was thinking about a workaround to remove all AmplifyMotionObject scripts right after instantiating objects (but before start), in case there is no camera, but that's a bit cumbersome. Or just add a dummy camera with the effect.

Is there an easier fix for this? There is no way to get the source code for AmplifyMotion, right?

Re: NullRef exception in AmplifyMotionObject

PostPosted: Mon Mar 31, 2014 3:04 pm
by Diogo Teixeira
Thanks for reporting this bug. This is definitely something we can fix.

We'll be releasing an update very soon, I'll make sure it includes a fix for it.

Re: NullRef exception in AmplifyMotionObject

PostPosted: Tue Apr 01, 2014 5:34 am
by any_user
That's perfect, thanks!

Re: NullRef exception in AmplifyMotionObject

PostPosted: Wed Apr 16, 2014 3:49 pm
by Diogo Teixeira