-
Notifications
You must be signed in to change notification settings - Fork 0
Texture2D Extensions
Andrzej Kebab edited this page Feb 2, 2024
·
1 revision
Loads a Texture2D from a file.
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.LoadFromFile(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.
Saves a Texture2D to a file (Default format: PNG).
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.SaveToFile(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.
Saves a Texture2D to an EXR file.
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.SaveToFileExr(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.
Saves a Texture2D to a TGA file.
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.SaveToFileTga(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.
Saves a Texture2D to a JPG file.
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.SaveToFileJpg(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.
Saves a Texture2D to a PNG file.
Texture2D texture2D = // Your Texture2D instance;
string path = // Path to the file;
texture2D.SaveToFilePng(path);Parameters:
-
texture2D: The Texture2D instance. -
path: The path to the file.