Indeed, "its own methods" was too specific a definition for me to use, as imperative languages don't have objects with methods but it is still a common convention to recognise a relationship between some functions and a data type for the sake of encapsulation.

But I think I still don't understand Unity, or perhaps I don't understand you properly. Perhaps I just don't understand components.

Here is the manual excerpt I quoted before for convenience:
Quote:
Every object in a scene has a Transform. It's used to store and manipulate the position, rotation and scale of the object.
The camera (or, in the code example, "Camera.main") has a Transform called "transform", and we call transform's method Translate. Is this not the case?

It appears to me that any and all objects in Unity have an object in them called a Transform that, in the rendering pipeline, will be called upon (likely through more of the Transform's methods if they maintain encapsulation) in order to construct the matrices of each object. The same would happen during physics calculations.

I'm not sure I understand component based programming, but it appears to me that it is a paradigm dependent on object oriented languages by which objects are constructed from many other pre-fabricated objects, but those objects still have their own properties and methods.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!