docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PrefabPackedIdentifiersSerializationIndexTests

    Mirrors the IN-104030 repro idea: one texture worth of "letter" subsprites (here A–F) and one texture worth of "digit" subsprites (0–9), modeled as ObjectIdentifiers that share guid+path per atlas. Contiguous bundles require every object from the same source asset to share the same asset-derived prefix of the serialization index (length depends on Prefab Packed Header Size; UUM-131143).

    Inheritance
    object
    PrefabPackedIdentifiersSerializationIndexTests
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Build.Pipeline.Tests
    Assembly: Unity.ScriptableBuildPipeline.Editor.Tests.dll
    Syntax
    [TestFixture]
    public class PrefabPackedIdentifiersSerializationIndexTests
    Remarks

    This file includes both UnityEditor and UnityEngine so the GUID type resolves across Unity versions (it may live in either assembly). Do not drop one of those usings as redundant cleanup.

    Methods

    SerializationIndexFromObjectIdentifier_AllDigitSubsprites_ShareOneAssetPrefix()

    Verifies that all digit subsprites (0 through 9) from the same atlas share one common asset-derived prefix, ensuring objects from the same source asset can be packed contiguously in bundles.

    Declaration
    [Test]
    public void SerializationIndexFromObjectIdentifier_AllDigitSubsprites_ShareOneAssetPrefix()

    SerializationIndexFromObjectIdentifier_AllLetterSubsprites_ShareOneAssetPrefix()

    Verifies that all letter subsprites (A through F) from the same atlas share one common asset-derived prefix, ensuring objects from the same source asset can be packed contiguously in bundles.

    Declaration
    [Test]
    public void SerializationIndexFromObjectIdentifier_AllLetterSubsprites_ShareOneAssetPrefix()

    SerializationIndexFromObjectIdentifier_DigitAtlas_0_SharesUpperBitsWith_9(int)

    Verifies that two subsprites (0 and 9) from the same digit atlas share the same asset-derived prefix in their serialization indices, as required for contiguous bundle packing.

    Declaration
    [TestCase(1)]
    [TestCase(2)]
    [TestCase(3)]
    [TestCase(4)]
    public void SerializationIndexFromObjectIdentifier_DigitAtlas_0_SharesUpperBitsWith_9(int headerSize)
    Parameters
    Type Name Description
    int headerSize

    The prefab packed header size to test (1-4 bytes).

    SerializationIndexFromObjectIdentifier_LetterAtlasAndDigitAtlas_DifferInAssetPrefix()

    Verifies that subsprites from different atlases (letter vs digit) have different asset-derived prefixes, ensuring objects from different source assets are distinguishable in their serialization indices.

    Declaration
    [Test]
    public void SerializationIndexFromObjectIdentifier_LetterAtlasAndDigitAtlas_DifferInAssetPrefix()

    SerializationIndexFromObjectIdentifier_LetterAtlas_A_SharesUpperBitsWith_F(int)

    Verifies that two subsprites (A and F) from the same letter atlas share the same asset-derived prefix in their serialization indices, as required for contiguous bundle packing.

    Declaration
    [TestCase(1)]
    [TestCase(2)]
    [TestCase(3)]
    [TestCase(4)]
    public void SerializationIndexFromObjectIdentifier_LetterAtlas_A_SharesUpperBitsWith_F(int headerSize)
    Parameters
    Type Name Description
    int headerSize

    The prefab packed header size to test (1-4 bytes).

    SerializationIndexFromObjectIdentifier_NonZeroFileIdHashSeed_LetterAndDigitAtlases_DifferInAssetPrefix()

    Verifies that letter and digit atlases have different asset-derived prefixes when a non-zero file ID hash seed is configured, ensuring distinct assets remain distinguishable.

    Declaration
    [Test]
    public void SerializationIndexFromObjectIdentifier_NonZeroFileIdHashSeed_LetterAndDigitAtlases_DifferInAssetPrefix()

    SerializationIndexFromObjectIdentifier_NonZeroFileIdHashSeed_LetterAtlas_SharesAssetPrefix(int)

    Verifies that letter atlas subsprites share the same asset-derived prefix even when a non-zero file ID hash seed is configured, ensuring consistent behavior across different hash seed configurations.

    Declaration
    [TestCase(1)]
    [TestCase(2)]
    [TestCase(3)]
    [TestCase(4)]
    public void SerializationIndexFromObjectIdentifier_NonZeroFileIdHashSeed_LetterAtlas_SharesAssetPrefix(int headerSize)
    Parameters
    Type Name Description
    int headerSize

    The prefab packed header size to test (1-4 bytes).

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)