Wanzyee Studio

Copy or paste properties from one UnityEngine.Material to another. More...

Static Public Member Functions

static void Copy (Material source)
 Copy properties of specified material as source to paste later. More...
 
static bool Paste (Material target)
 Paste properties of the source copied before to the specified target. More...
 

Detailed Description

Copy or paste properties from one UnityEngine.Material to another.

Operate by UnityEngine.Material context menu "Copy Properties" and "Paste Properties". This works like the similar menu of UnityEngine.Component, and will change the shader. To keep valid after script reloaded by a temporary material as medium storage. Copy properties by built-in Material.CopyPropertiesFromMaterial() method.

Member Function Documentation

static void Copy ( Material  source)
static

Copy properties of specified material as source to paste later.

Parameters
sourceSource.
static bool Paste ( Material  target)
static

Paste properties of the source copied before to the specified target.

Parameters
targetTarget.
Returns
false, if the source doesn't exist yet, otherwise true.