Method IsPrefab
IsPrefab(GameObject)
Check whether a GameObject is a prefab.
For editor only - some things are disallowed if prefab. In runtime, will always return false.
Declaration
public static bool IsPrefab(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | the object to check |
Returns
Type | Description |
---|---|
bool | If editor, checks if object is a prefab or prefab instance. |