Under review

How to disable game creator camera ?

Dany 6 months ago in Game Creator updated by Marti (Lead Developer) 6 months ago 7


I want to use my own camera script. But the game creator keep adding the hook camera and the camera control every time I run the editor. Is there a settings somewhere to disable this auto add camera component ?

Unity version:
Game Creator version:

From memory, it only adds the hook to the Camera if you have GC Camera Motors defined. Remove any Camera motors from you scene hierarchy, and that should do it.

Hi ProfPivec, I already remove any game creator camera components, including the camera motors. But the hook keep getting added to my main camera and I get this errors :

NullReferenceException: Object reference not set to an instance of an object
GameCreator.Camera.CameraMotorTypeAdventure.UpdateMotor () (at Assets/Plugins/GameCreator/Camera/Motors/CameraMotorTypeAdventure.cs:173)
GameCreator.Camera.ICameraMotorType.Update () (at Assets/Plugins/GameCreator/Camera/Motors/ICameraMotorType.cs:40)

Which make sense, because it want to access the camera motor and I dont have it in my scene hierarchy. What doesn make sense to me is why is this function called even when there is no camera motor in scene hierarchy. Can you elaborate more about it being defined in memory ?

lol, sorry, I was referring to my memory as I am out of the office away from my computer.

However, if you have no camera motors in your scene, it should not add the hook. I would suggest that you delete the main camera and re-add it.

I can have a GC player and other stuff from GC in my scene without using the GC Camera or Camera motors, It works fine, and the Hook is not added.

Thanks ProfPivec, deleting the main camera and create a new one seems to fixed the camera motor errors. But the camera hook and camera controller still get auto added to the new main camera. If possible, I don't want those component on my main camera.

And I'm still curious about that CameraMotorTypeAdventure.cs still on even when there is no camera motor in scene hierarchy.

Under review

We decided to automatically add any Camera Motor to the Camera Controller (and create it if there isn't one) because one of the most bug reports where when a user created a Camera Motor, it didn't work (since they forgot to link it to the Main Camera's Camera Controller).

Regarding the CameraMotorTypeAdventure script not disappearing, this looks like something wrong occurred. You should be able to delete the camera game object and that should clean it up.

If you find a way to reproduce this consistently, could you let us know?

Hi Marti, I cannot reproduce this issue consistently, but I remember what I do. 

I was adding the camera motor and the camera controller while in editor play mode, and when I try quickly change the camera type, and while its changing the setup, I stop the play mode. And after that, the CameraMotorTypeAdventure is kind of stuck somewhere.

The idea of auto adding the motor when the controller is in scene is really great, but auto adding the motor and the controller when both of them is not added in scene is really weird for me.

Hmm that's a quite strange things to do. I'll open a ticket, although it's not top priority at the moment, since it's so difficult to pull off.

Thank you nonetheless!