A mapping from USD shader ID to Unity Material.
public class MaterialMap : IEnumerable<KeyValuePair<string, Material>>, IEnumerable
Fields
Looks for additional metadata describing the original shader name, rather than using
the generic spec/metallic workflow shaders.
Declaration
public bool useOriginalShaderIfAvailable
Field Value
Properties
A material to use when no material could be found.
Declaration
public Material DisplayColorMaterial { get; set; }
Property Value
Returns a shared instance of the mapped material, else null. Does not throw exceptions.
Declaration
public Material this[string path] { get; set; }
Parameters
Type |
Name |
Description |
String |
path |
|
Property Value
Declaration
public Material MetallicWorkflowMaterial { get; set; }
Property Value
Declaration
public Material SpecularWorkflowMaterial { get; set; }
Property Value
Methods
Declaration
public static void AssignColor(Material material, Color color)
Parameters
Clears the requested bindings, returning the current queue.
Declaration
public Dictionary<string, MaterialMap.MaterialBinder> ClearRequestedBindings()
Returns
Declaration
public IEnumerator GetEnumerator()
Returns
Declaration
public List<string> GetPrimvars(string materialPath)
Parameters
Type |
Name |
Description |
String |
materialPath |
|
Returns
Returns an instance of the solid color material, setting the color. If the same color is
requested multiple times, a shared material is returned.
Declaration
public Material InstantiateSolidColor(Color color)
Parameters
Type |
Name |
Description |
Color |
color |
|
Returns
Request an object to be bound at a later time in a vectorized request.
Declaration
public void RequestBinding(string usdPath, MaterialMap.MaterialBinder binder)
Parameters
Type |
Name |
Description |
String |
usdPath |
The USD path to the object.
|
MaterialMap.MaterialBinder |
binder |
A callback which will accept the material and bind it to a Unity object
|
Declaration
public void SetPrimvars(string materialPath, List<string> primvars)
Parameters