Heyo!
Really quick question,
In the Camera documentation (https://defold.com/manuals/camera/) under “Using the camera”, it says I can either use:
camera.acquire_focus("#camera")
or
msg.post("#camera", "acquire_camera_focus")
The latter works great and I got stuff to render fine, the but former, “camera.acquire_focus” gives me an error:
attempt to index global 'camera' (a nil value)
This makes sense to me, nowhere in the script do I tell Defold exactly what camera is. However none of the docs I’ve been able to find have explained to me how I can reference components through a variable.
Everything about addressing components or gameobjects things talks about using hashtags and strings, but nowhere does it explains how I can define “camera”.
My hierarchy for reference:
So does anybody know how I can do stuff like:
local camera = [insert code how to reference camera here]
Thanks!