Description:

Finds a material index.

Syntax:
public int Find(
Material material,
bool ignoreDeletedMaterials
)
Parameters:
  • material
  • Type: Material
  • Material to search for.
  • ignoreDeletedMaterials
  • Type: bool
  • True means don't search deleted materials.
Returns:
Type: int
>=0 index of the material -1 no material matchin material.
Available since:
8.0

Description:

Finds a material with a given name.

Syntax:
public int Find(
string materialName,
bool ignoreDeletedMaterials
)
Parameters:
  • materialName
  • Type: string
  • Name of the material to search for. The search ignores case.
  • ignoreDeletedMaterials
  • Type: bool
  • True means don't search deleted materials.
Returns:
Type: int
>=0 index of the material with the given name -1 no material has the given name.
Available since:
5.0

Description:

Finds a material with a matching id.

Syntax:
public int Find(
Guid materialId,
bool ignoreDeletedMaterials
)
Parameters:
  • materialId
  • Type: System.Guid
  • A material ID to be found.
  • ignoreDeletedMaterials
  • Type: bool
  • If true, deleted materials are not checked.
Returns:
Type: int
>=0 index of the material with the given name -1 no material has the given name.
Available since:
5.0

Nothing found