Hello!
Let’s take a simple script:
go.property("name", hash(""))
function init(self)
print("Name:", self.name)
end
And add it to game object. In game object I change property to: “go”:
And when I use this object in collection I want it to use this name, so I don’t change it here:
As you can see in the console the self.name is though “unknown”. It thought it will be “go”, because that’s what is set “by default”. Is this a bug? How can I set a default name for such game object to be used every time I put it in collection? Is there a related documentation fragment?
It looks like it is only possible to set the name in game object in collection:
This repro:
hash_property.zip (14.7 KB)
P.S.
The other problem is even though I will set the name at the game object used in collection, but when I create this collection using a factory, I get also “unknown”: