gorbac
gorbac copied to clipboard
why not return error when setting parents if there is a circle error
Several advices:
SetParent, if you set1toa, thena == 1, butSetParentis more likeAddParent- If there are some potential circle errors, they should be thrown immediately rather than at runtime
I would agree with the first point and it will be improved.
The second one, if we put circle detecting to the function it will reduce the performance significantly.
I suggest using InherCircle manually and adding it to each SetParent call if detecting circle errors is the key step to you.
Thank you!
By the way, thank you for your work