Search Unity

Question How Prefab Variant FileIDs are referered to in fields?

Discussion in 'Scripting' started by ArtyUwU, Jan 6, 2023.

  1. ArtyUwU

    ArtyUwU

    Joined:
    Dec 27, 2018
    Posts:
    15
    Hello, I am trying to change a prefab with a prefab variant.
    Does anyone know how does AssetDatabase.TryGetGUIDAndLocalFileIdentifier calculate(?) the FileID of a Prefab Variant? This is the FileID referenced to when I assign the variant to a field. But it does not match any actual FileID in the project, even the FileID of the assigned Prefab Variant is not same. It works but where does it refer to?
    The fields I assign this prefab variant to are of type GameObject if that matters.