Description
The Title
property of the Scene
class represents the title of the scene. However, this property is marked as obsolete and should not be used in new code. Instead, it is recommended to use the SceneInformation
component to manage scene titles and related information.
Usage
Since the Title
property is obsolete, it is advised to transition to using the SceneInformation
component for handling scene titles. This ensures compatibility with future updates and maintains best practices in code management.
Example
// Example of accessing the Title property (not recommended due to obsolescence)
Scene myScene = new Scene();
string sceneTitle = myScene.Title; // Obsolete usage
// Recommended approach
SceneInformation sceneInfo = myScene.GetComponent<SceneInformation>();
string recommendedTitle = sceneInfo.Title;