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