ドキュメント

Unity Engine

Unity Engine

GetSharedMaterials(List<Material>)

Returns all the shared materials of this object.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public void GetSharedMaterials(List<Material> m)

Parameters

A list of materials to populate.

Remarks

Use this method instead of Renderer.sharedMaterials if you control the life cycle of the list passed in and you want to avoid allocating a new array with every access.