LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

SortingLayer.IsValid

public static bool IsValid(int id);

Parameters

idThe unique id of a layer.

Returns

bool True if the id provided is valid and assigned to a layer.

Description

Returns true if the id provided is a valid layer id.