Non-Working Example from the Camera Component Manual

I followed this manual to use camera, write go.set("#camera", "enable") instead of acquire_camera_focus.
However, I got this error.

ERROR:GAMEOBJECT: Properties can not be of type ‘no value’.
ERROR:SCRIPT: main/game/camera/script_camera.script:4: the property ‘enable’ of ‘#camera’ must be a number

Using msg.post("#camera", "enable") works.

It should probably be:

go.set("#camera", "enable", true)

No scratch that. It should be messages like you figured out yourself:

1 Like

I’ve updated the documentation: Update camera.md · defold/doc@db22edc · GitHub

2 Likes