When you inherit from a component type, you create a new type with its own GUID. The new type is the descendant, while the other is the ancestor. You can add new elements to the new type. Further, the editor makes sure that it keeps all of its ancestor’s traits in order to stay compatible with its parent. However, you can't change the parameter type for the ancestor’s methods.
You can add more program code to ancestors by overriding ancestor methods in the descendant. The word "INHERITED" represents the code from the ancestor in the program code, and you can see it in the code window shown to the descendants. In the descendant you can choose to:
- Delete INHERITED - the methods from the ancestor chain will not be called.
- Add program code before INHERITED - The descendant code runs first, and then the ancestor code.
- Add program code after INHERITED - the ancestor code runs first, and then the descendant code.
« Back to Glossary Index