-
Is it possible to embed a struct to use in scene? Some example: type Enemy struct {
classdb.Extension[Enemy, CharacterBody3D.Instance]
EnemyTest
}
func (n *Enemy) Ready() {
println(n.Collision == CollisionShape3D.Nil)
}
type EnemyTest struct {
Collision CollisionShape3D.Instance
} Code is root of a scene where i have I am trying to separate common parts of my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think this makes sense, you are expecting the embedded fields as if they had been added to the parent struct. I'll have a look at implementing this (it's not supported yet). |
Beta Was this translation helpful? Give feedback.
@ring-c have just pushed a commit that should handle embedded fields for extension classes.