At assigning one field to another, does the C# just copy data over, or actually creates link? In this article there's an example of game engine structure. The coder there has components contain their parent. In C#, do they just contain the parent copy, or they refer to it?
Example code:
class World
{
...
public void Update()
{
...
ent.OnAttach(this);
...
}
...
}
class Entity
{
...
public void OnAttach(World world)
{
world_ = world;
}
...
}
Could the Entity object now access World object and have access to it's fields and methods, like in the artice? (or I misunderstood the code?)