This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Say I've got class A, B and C

B depends on C
A depends on B & C

I'm auto-loading C, B and A in that order.

Godot appears to see this as a cyclic dependency. Why/what's the fix?

in Engine by (12 points)

1 Answer

0 votes

You should avoid that kind of behavoiur in your code.
In Godot no node should be dependant of other nodes. It's that way by design.

Let's pretend you want to make a car but each of its pieces you decide will be a single node: tyres, doors, etc.. So that way you can edit each node by each own.

All those nodes will be instanced in a single scene: Car.
That scene, Car, will have all those nodes combined to make a car but each will not have dependancy of the others. The Car scene will combine those nodes together to create a car.

by (232 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.