Modifier

Partager via


UIMaterialInstantiator.TryCreateMaterialCopy(Graphic) Method

Definition

Invoke this method to create a copy of the material and use that copy at runtime for Graphic objects to prevent modifying materials in editor or impact shared materials.

public:
 static void TryCreateMaterialCopy(UnityEngine::UI::Graphic ^ targetGraphic);
public static void TryCreateMaterialCopy (UnityEngine.UI.Graphic targetGraphic);
static member TryCreateMaterialCopy : UnityEngine.UI.Graphic -> unit
Public Shared Sub TryCreateMaterialCopy (targetGraphic As Graphic)

Parameters

targetGraphic
UnityEngine.UI.Graphic

Graphic element that needs to clone its material

Applies to