entity.md 678 B

Getting the entity

You can find this sample in the tutorial project: Menu -> Getting an entity

Explanation

This C# Beginner tutorial covers how to get the entity object.

When a script is attached to an entity in the scene, we can access all properties of that Entity by using the Entity property. We can for instance get the entity's name or we can check if the entity has a parent in the scene.

Getting the entity example

[!Video https://www.youtube.com/embed/DUmZujopcY8]

Code

[!code-csharpEntity]