Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

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

AssetDatabase.Contains

Switch to Manual
public static function Contains(obj: Object): bool;
public static function Contains(instanceID: int): bool;

Parameters

Description

Is object an asset?

Returns true when an object is an asset (corresponds to a file in the Assets folder), and false if it is not (for example object in the scene, or an object created at runtime).