Godot Version
4.4.stable
Question
Hello, I have the following setup:
Main (Node3D)
| - Pawn
|…
Pawn (CharacterBody3D)
| - CSGSphere3D
|…
I wanted to change color of the Pawn’s sphere while editing Main scene in editor.
this is pawn.gd
@tool
extends CharacterBody3D
@export var material: Material:
set(new_material):
$CSGSphere3D.material = new_material
func _ready() -> void:
pass
However, when trying to set the Material from editor in Main scene, the color of the Pawn does change but in the inspector the material variable is still set to <empty>.
I have already tried to delete and re-add the Pawn node, reload the scene, restart the engine but it didn’t help.
Sorry for my bad english.