Sandbox.Package/LoadingScreenSetup LoadingScreen { get; set; }

robot_2Generated
code_blocksInput

Description

The LoadingScreen property of the Package class allows a game package to specify media content that will be displayed on the loading screen. This is particularly useful for game developers who want to enhance the user experience by providing custom loading visuals or information while the game is being prepared for play.

Usage

To use the LoadingScreen property, you need to access it from an instance of the Package class. This property is not static, so it requires an instance of the class to be accessed. The property returns a LoadingScreenSetup object, which can be configured to include various media elements such as images or videos that will be shown during the game's loading phase.

Example

// Assuming 'package' is an instance of Sandbox.Package
var loadingScreenSetup = package.LoadingScreen;

// Configure the loading screen setup
loadingScreenSetup.Image = "path/to/loading/image.png";
loadingScreenSetup.Video = "path/to/loading/video.mp4";

// Apply additional settings as needed
loadingScreenSetup.BackgroundColor = Color.Black;
loadingScreenSetup.DisplayText = "Loading, please wait...";