logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementSyncAssetTestBase

    The private temp folder, the authored fixture assets and the Addressables clean-up every test that applies a sync plan to real assets needs. Every fixture asset lives under a folder named after the concrete test class, and creations pass RegisterAsAddressables = false, mirroring AchievementDefinitionCreatorTests.

    Inheritance
    object
    AchievementSyncAssetTestBase
    AchievementSyncApplyConsequencesTests
    AchievementSyncAssetWriterTests
    AchievementSyncIconSizeLimitTests
    AchievementSyncKeyAdoptionTests
    AchievementSyncKeyCollisionApplyTests
    AchievementSyncPulledIconTests
    AchievementSyncStorefrontCopyMarkTests
    AchievementSyncTranslatedCreationTests
    AchievementSyncTranslatedPullEndToEndTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.UnityAchievements.Tests.Editor
    Assembly: Tests.Editor.dll
    Syntax
    public abstract class AchievementSyncAssetTestBase

    Constructors

    AchievementSyncAssetTestBase()

    Declaration
    protected AchievementSyncAssetTestBase()

    Properties

    TempFolder

    Declaration
    protected string TempFolder { get; }
    Property Value
    Type Description
    string

    The project folder this test class keeps its fixture assets in.

    Methods

    AuthorAchievement(string, string)

    Declaration
    protected UnityAchievementDefinition AuthorAchievement(string achievementId, string folder)
    Parameters
    Type Name Description
    string achievementId
    string folder
    Returns
    Type Description
    UnityAchievementDefinition

    CountAddressableEntries()

    Declaration
    protected static int CountAddressableEntries()
    Returns
    Type Description
    int

    CreateFolderRecursively(string)

    Declaration
    protected static void CreateFolderRecursively(string folder)
    Parameters
    Type Name Description
    string folder

    CreateFolderThenRemoveItFromDisk(string)

    Leaves a folder the UnityEditor.AssetDatabase still believes in but that no longer exists on disk, which is what makes UnityEditor.AssetDatabase.CreateAsset(UnityEngine.Object,System.String) fail for real instead of being simulated. Mirrors AchievementDefinitionCreatorTests.CreateFolderThenRemoveItFromDisk.

    Declaration
    protected string CreateFolderThenRemoveItFromDisk(string folderName)
    Parameters
    Type Name Description
    string folderName
    Returns
    Type Description
    string

    OneTimeTearDown()

    Every per-test deletion above goes through AssetDatabase.DeleteAsset, which updates the asset database immediately — a manual refresh between tests is unnecessary; flushing to disk once after the whole fixture is enough.

    Declaration
    public void OneTimeTearDown()

    RepairTheAssetDatabaseCacheBeforeTeardown()

    Declaration
    protected static void RepairTheAssetDatabaseCacheBeforeTeardown()

    SaveDefinition(UnityAchievementDefinition)

    Declaration
    protected static void SaveDefinition(UnityAchievementDefinition definition)
    Parameters
    Type Name Description
    UnityAchievementDefinition definition

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

    Declaration
    public void TearDown()

    Track(string)

    Declaration
    protected void Track(string assetPath)
    Parameters
    Type Name Description
    string assetPath
    In this article
    © 2026 Serenity. All Rights Reserved