duplicate

Create a new MaterialInstance by duplicating an existing one.

This is useful for creating instances with the same initial parameters as an existing instance without having to re-set all parameters individually.

Return

A new MaterialInstance with all parameters copied from other.

Parameters

other

A MaterialInstance to copy parameter values from.

name

Optional debug name for the new instance (null to use other's name).

expect fun duplicate(other: MaterialInstance, name: String? = null): MaterialInstance

Create a new MaterialInstance by duplicating an existing one.

This is useful for creating instances with the same initial parameters as an existing instance without having to re-set all parameters individually.

Return

A new MaterialInstance with all parameters copied from other.

Parameters

other

A MaterialInstance to copy parameter values from.

name

Optional debug name for the new instance (null to use other's name).

Create a new MaterialInstance by duplicating an existing one.

This is useful for creating instances with the same initial parameters as an existing instance without having to re-set all parameters individually.

Return

A new MaterialInstance with all parameters copied from other.

Parameters

other

A MaterialInstance to copy parameter values from.

name

Optional debug name for the new instance (null to use other's name).

Create a new MaterialInstance by duplicating an existing one.

This is useful for creating instances with the same initial parameters as an existing instance without having to re-set all parameters individually.

Return

A new MaterialInstance with all parameters copied from other.

Parameters

other

A MaterialInstance to copy parameter values from.

name

Optional debug name for the new instance (null to use other's name).

Create a new MaterialInstance by duplicating an existing one.

This is useful for creating instances with the same initial parameters as an existing instance without having to re-set all parameters individually.

Return

A new MaterialInstance with all parameters copied from other.

Parameters

other

A MaterialInstance to copy parameter values from.

name

Optional debug name for the new instance (null to use other's name).