Class Texture
Texture asset contains an image that is usually stored on a GPU and is used during rendering graphics.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class Texture : TextureBaseConstructors
Texture()
Properties
IsNormalMap
Returns true if texture is a normal map.
Declaration
[Unmanaged]
public bool IsNormalMap { get; }Property Value
| System.Boolean 
 | 
Methods
FromFile(String, Boolean)
Loads the texture from the image file and creates the virtual texture asset for it. Supported file formats depend on a runtime platform. All platform support loading PNG, BMP, TGA, HDR and JPEG files.
Declaration
[Unmanaged]
public static Texture FromFile(string path, bool generateMips = false)Parameters
| System.String
        path The source image file path. | 
| System.Boolean
        generateMips True if generate mipmaps for the imported texture. | 
Returns
| Texture The loaded texture (virtual asset) or null if fails. | 
LoadFile(String, Boolean)
Loads the texture from the image file. Supported file formats depend on a runtime platform. All platform support loading PNG, BMP, TGA, HDR and JPEG files.
Declaration
[Unmanaged]
public bool LoadFile(string path, bool generateMips = false)Parameters
| System.String
        path The source image file path. | 
| System.Boolean
        generateMips True if generate mipmaps for the imported texture. | 
Returns
| System.Boolean True if fails, otherwise false. | 
Remarks
Valid only for virtual assets.