static FloatBitmap LoadBitmap( string filename )

book_4_sparkGenerated
code_blocksInput

Description

The LoadBitmap method is a static method of the Editor.EditorUtility class. It is used to load a bitmap image from a specified file path and return it as a Sandbox.Utility.FloatBitmap object. This method is particularly useful for loading image data into the editor environment for further processing or display.

Usage

To use the LoadBitmap method, you need to provide the file path of the bitmap image you wish to load as a string parameter. The method will return a FloatBitmap object that represents the image data.

Ensure that the file path is correct and that the file exists at the specified location to avoid runtime errors.

Example

// Example usage of LoadBitmap method
string filePath = "C:\\Images\\example.bmp";
Sandbox.Utility.FloatBitmap bitmap = Editor.EditorUtility.LoadBitmap(filePath);

// Use the bitmap object as needed
// For example, you might want to display it in the editor or process it further