book_4_sparkGenerated
code_blocksInput

Description

The GetAll method is an extension method for the GameObjectDirectory class, provided by the SceneExtensions class. It retrieves all GameObject instances contained within the specified GameObjectDirectory.

Usage

To use the GetAll method, you need to have a GameObjectDirectory instance. This method will return an IEnumerable<GameObject> containing all the game objects within the directory.

Example usage:

GameObjectDirectory directory = ...; // Assume this is initialized
IEnumerable<GameObject> allGameObjects = SceneExtensions.GetAll(directory);
foreach (var gameObject in allGameObjects)
{
    // Process each game object
}

Example

GameObjectDirectory directory = new GameObjectDirectory();
IEnumerable<GameObject> allGameObjects = SceneExtensions.GetAll(directory);
foreach (GameObject gameObject in allGameObjects)
{
    // Perform operations on each game object
}