Represents a scene in the application, providing methods to manage entities and load or destroy scenes.
More...
|
| override bool | Equals (object obj) |
| | Determines whether the specified object is equal to the current asset.
|
| |
| bool | Equals (Asset< T > other) |
| | Determines whether the specified Asset<T> is equal to the current asset.
|
| |
| override int | GetHashCode () |
| | Serves as the default hash function for the asset.
|
| |
| Guid | uid [get, set] |
| | Gets the unique identifier (UID) of the asset.
|
| |
Represents a scene in the application, providing methods to manage entities and load or destroy scenes.
Definition at line 9 of file Scene.cs.
◆ CloneEntity()
Clones an existing entity.
- Parameters
-
- Returns
- A new entity that is a clone of the specified entity.
Definition at line 54 of file Scene.cs.
◆ CreateEntity()
| static Entity Unravel.Core.Scene.CreateEntity |
( |
string | name = "Unnamed" | ) |
|
|
static |
Creates a new entity with the specified name.
- Parameters
-
| name | The name to assign to the new entity. Defaults to "Unnamed". |
- Returns
- The newly created entity.
Definition at line 64 of file Scene.cs.
◆ DestroyEntity()
| static void Unravel.Core.Scene.DestroyEntity |
( |
Entity | entity, |
|
|
float | seconds = 0::0f ) |
|
static |
Destroys the specified entity after a delay.
- Parameters
-
| entity | The entity to destroy. |
| seconds | The delay in seconds before destruction. Defaults to 0. |
Definition at line 74 of file Scene.cs.
◆ DestroyEntityImmediate()
| static void Unravel.Core.Scene.DestroyEntityImmediate |
( |
Entity | entity | ) |
|
|
static |
Immediately destroys the specified entity.
- Parameters
-
| entity | The entity to destroy. |
Definition at line 86 of file Scene.cs.
◆ FindEntitiesByName()
| static Entity[] Unravel.Core.Scene.FindEntitiesByName |
( |
string | name | ) |
|
|
static |
Finds all entities with the specified name.
- Parameters
-
| name | The name to search for. |
- Returns
- The entities with the specified name, or
empty if no entities match.
Definition at line 143 of file Scene.cs.
◆ FindEntitiesByTag()
| static Entity[] Unravel.Core.Scene.FindEntitiesByTag |
( |
string | tag | ) |
|
|
static |
Finds all entities with the specified tag.
- Parameters
-
| tag | The tag to search for. |
- Returns
- The entities with the specified tag, or
empty if no entities match.
Definition at line 119 of file Scene.cs.
◆ FindEntitiesWithComponent< T >()
| static Entity[] Unravel.Core.Scene.FindEntitiesWithComponent< T > |
( |
| ) |
|
|
static |
Finds all entities that have the specified component type.
- Template Parameters
-
| T | The component type to search for. |
- Returns
- The entities that have the specified component, or empty if no entities match.
Definition at line 155 of file Scene.cs.
◆ FindEntityByName()
| static Entity Unravel.Core.Scene.FindEntityByName |
( |
string | name | ) |
|
|
static |
Finds the first entity with the specified name.
- Parameters
-
| name | The name to search for. |
- Returns
- The entity with the specified name, or
invalid if no such entity exists.
Definition at line 132 of file Scene.cs.
◆ FindEntityByTag()
| static Entity Unravel.Core.Scene.FindEntityByTag |
( |
string | tag | ) |
|
|
static |
Finds the first entity with the specified tag.
- Parameters
-
| tag | The tag to search for. |
- Returns
- The entity with the specified tag, or
invalid if no such entity exists.
Definition at line 109 of file Scene.cs.
◆ Instantiate() [1/2]
| static Entity Unravel.Core.Scene.Instantiate |
( |
Prefab | prefab | ) |
|
|
static |
Instantiates an entity from a specified prefab.
- Parameters
-
| prefab | The prefab to instantiate. |
- Returns
- The instantiated entity.
Definition at line 34 of file Scene.cs.
◆ Instantiate() [2/2]
| static Entity Unravel.Core.Scene.Instantiate |
( |
string | key | ) |
|
|
static |
Instantiates an entity from a prefab identified by a key.
- Parameters
-
| key | The key identifying the prefab to instantiate. |
- Returns
- The instantiated entity.
Definition at line 44 of file Scene.cs.
◆ IsEntityValid()
| static bool Unravel.Core.Scene.IsEntityValid |
( |
Entity | entity | ) |
|
|
static |
Determines whether the specified entity is valid within the current scene.
- Parameters
-
| entity | The entity to validate. |
- Returns
true if the entity is valid; otherwise, false.
Definition at line 99 of file Scene.cs.
◆ LoadScene() [1/2]
| static void Unravel.Core.Scene.LoadScene |
( |
Scene | scene | ) |
|
|
static |
Loads a scene using a Scene asset.
- Parameters
-
| scene | The Scene asset to load. |
Definition at line 24 of file Scene.cs.
◆ LoadScene() [2/2]
| static void Unravel.Core.Scene.LoadScene |
( |
string | key | ) |
|
|
static |
Loads a scene by its unique key.
- Parameters
-
| key | The key identifying the scene to load. |
Definition at line 15 of file Scene.cs.
The documentation for this class was generated from the following file:
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine_data/data/scripts/scene/Scene.cs