Version: 2019.1
public static bool IsPartOfAnyPrefab (Object componentOrGameObject);

パラメーター

componentOrGameObjectThe object to check. Must be a component or GameObject.

戻り値

bool True if the object s part of a Prefab.

説明

Returns true if the given object is part of any kind of Prefab.

Use this to check if a given object is part of any Prefab, regardless of whether it's a Prefab Asset or a Prefab instance.