ScriptReference/PrefabAssetType #332
Replies: 1 comment
-
|
Comment by This enum and PrefabInstanceStatus on their own 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/PrefabAssetType
https://docs.unity3d.com/ScriptReference/PrefabAssetType.html
Beta Was this translation helpful? Give feedback.
All reactions