I'm not sure if I am doing something wrong, but I always get the same results.
class Test:
var a := 0
func _ready() -> void:
var test := Test.new()
var sizeof := 0
for bit in var2bytes(test):
sizeof += bit
print(sizeof)
Output: 33
class Test:
var a := "Test"
func _ready() -> void:
var test := Test.new()
var sizeof := 0
for bit in var2bytes(test):
sizeof += bit
print(sizeof)
Output: 33