Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Livetrack |
Hi everyone,
I am new to Godot. I wanted to use the same paradigm we see in OPP, especially Polymorphism. I have a base scene “AbstractCar” that looks like an abstract scene, with some logic. Then I created some derived scene “Car”, “Bus”… by using Scene->New inherited scene.
Then, I have another base scene “AbstractRoad”, that uses “AbstractCar”. i wrote some logic. Then, I created some derived scenes “Road”, “Highway”… But, I want the scene “Road” to use “Car” instead of “AbstractCar”.
The problem is that I can’t change anything inherited in “Road”. I am stuck with “AbstractCar”. How can I solve this problem ?
You can break scene inheritance.
Save the inherited scene as a file. Once that’s done, Right click the root node and click Clear Inheritance
.
Kyle Guarco | 2019-04-21 03:32
Thank you a lot ! This is what I needed.
Livetrack | 2019-04-21 06:39