Enfusion Script API
Loading...
Searching...
No Matches
Material Interface Reference
Inheritance diagram for Material:
Managed

Public Member Functions

proto bool SetParam (string paramName, void value)
 set parametr of material by string name
 
proto external void ResetParam (string paramName)
 reset parametr of material to default value
 
proto external int GetParamIndex (string paramName)
 set parametr index for faster access to material properties
 
proto void SetParamByIndex (int paramIndex, void value)
 Set parameter of material by index.
 
proto void GetName (out string name)
 material name
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Static Public Member Functions

static proto ref Material GetMaterial (ResourceName matName)
 Get material, must exist in internal cache.
 
static proto ref Material GetOrLoadMaterial (ResourceName matName, int flags)
 get material or load it of it doesn't exist in internal cache
 
static proto ref Material Create (string name, string matClassName, map< string, string > params=null)
 

Member Function Documentation

◆ Create()

static proto ref Material Material.Create ( string name,
string matClassName,
map< string, string > params = null )
static

◆ GetMaterial()

static proto ref Material Material.GetMaterial ( ResourceName matName)
static

Get material, must exist in internal cache.

Parameters
matNamematerial resource

◆ GetName()

proto void Material.GetName ( out string name)

material name

◆ GetOrLoadMaterial()

static proto ref Material Material.GetOrLoadMaterial ( ResourceName matName,
int flags )
static

get material or load it of it doesn't exist in internal cache

Parameters
matNamematerial resource
flagsmaterial creation flags, use 0

◆ GetParamIndex()

proto external int Material.GetParamIndex ( string paramName)

set parametr index for faster access to material properties

Parameters
paramNamename of parameter
Returns
parameter index

◆ ResetParam()

proto external void Material.ResetParam ( string paramName)

reset parametr of material to default value

Parameters
paramNamename of parameter

◆ SetParam()

proto bool Material.SetParam ( string paramName,
void value )

set parametr of material by string name

Parameters
paramNamename of parameter
valuevalue

◆ SetParamByIndex()

proto void Material.SetParamByIndex ( int paramIndex,
void value )

Set parameter of material by index.


The documentation for this interface was generated from the following file: