Godot Version
v4.2.2.stable.official [15073afe3]
Question
I am trying to use a script to set the “Billboard” flag of a Sprite3D in the scene, but when the variable for the Sprite3D is created using “@export var sprite : Sprite3D” , and I include the line “sprite.billboard = false” in the _physics_process(delta) function ( though it happens even if it’s in _process(delta) or _ready() ), I get these errors:
res://assets/scripts/paper_character.gd:56 - Parse Error: Cannot assign a value of type “bool” as “BaseMaterial3D.BillboardMode”.
res://assets/scripts/paper_character.gd:56 - Parse Error: Value of type “bool” cannot be assigned to a variable of type “BaseMaterial3D.BillboardMode”.
This does not happen when creating the variable with "@onready var sprite = $Sprite3D , but I would prefer to use @export, so I want to understand why there only appears to be an error when doing so. I also do not have any issue when using @export for a Sprite2D, I have only had this issue with a Sprite3D.