|Topic was automatically imported from the old Question2Answer platform.
I want to add an exported variable to my script, so that it’s editable in the inspector GUI. For simple data types this works fine:
export(float) var FadeInDuration = 2.0
This variable shows up in the GUI and can be changed there.
Now I would like to do the same for a camera:
export(Camera) var TargetCamera
My script should would then use this variable to do do some fancy stuff with the camera that has been assigned to it in the GUI.
But this won’t compile:
Error: The export hint isn’t a resource type.
Can I create an exported variable that the user can assign a camera to in the GUI?