23
4

cursed godot error

1mon 9d ago by piefed.social/u/MousePotatoDoesStuff in godot@programming.dev from www.youtube.com

had to change how parent component is checked

still not sure what caused this

discord: https://discord.gg/WFwUXe6Em8
stoat: https://stt.gg/6T7e7yb7

I dont get whats going on I think the post needs more information

My bad. This is a tool-type ECS component (a component that affects an entity, usually - and in this case - its parent). It seems to have been adopted by a node of the editor tree, leading to infinite recursion.

Did you end up figuring out the solution?

Yeah, I made the script check whether it's a child of a Node2D before accepting its parent as its component.

Some other solutions might be:

  • removing the tool modifier (not applicable in my case)
  • making the user manually assign the component (not necessary in this case)