ScriptReference/PrefabInstanceStatus #331
Replies: 1 comment
-
|
Comment by Took me a while to figure this out, this enum and PrefabAssetType don't really give a straightforward way to check whether the object you're testing is a prefab or an instance of a prefab. if (_prefabAssetType != PrefabAssetType.NotAPrefab)
{
if (_prefabInstanceStatus != PrefabInstanceStatus.NotAPrefab)
{
// It's an instance
}
else
{
// It's a prefab
}
}
else
{
// It's neither of those
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/PrefabInstanceStatus
https://docs.unity3d.com/ScriptReference/PrefabInstanceStatus.html
Beta Was this translation helpful? Give feedback.
All reactions