Hello, I found a stack overflow when trying to clone an instance and assigning the instance as the parent of its clone (via the clone method).
Here’s a playground :
Thanks in advance for the fix.
Hello, I found a stack overflow when trying to clone an instance and assigning the instance as the parent of its clone (via the clone method).
Here’s a playground :
Thanks in advance for the fix.
You cannot assign ‘self’ as parent of your ‘self’! you don’t have children, do you? ‘Self’ IS its own parent (unless parented to new). And then, I don’t really see why you want to ‘clone’ an instance as such. Why not just make two instances? Unless you clone the hierarchy. Cloning an instance will still remain an ‘instance’ (of the source). You won’t be able to change IE its material as you would do with a clone (from a mesh).
You cannot assign ‘self’ as parent of your ‘self’!
Indeed, what I meant was assigning the original instance as the clone parent. I’ll edit the post.
And then, I don’t really see why you want to ‘clone’ an instance as such
Yeah it’s a very specific case, though the code i’m working on probably wont be definitive. But I found the issue and I think one less stack overflow is always a good thing
Can’t agree more . It has become the last place where I go Each time I go there it gets me even more confused . It’s named ‘overflow’ anyway… so what can you expect? I’m glad you found your solution. Have a great day