Esempio n. 1
0
        public void GetRuntimeProviderType_HandlesNullAssetType(Type testProviderType)
        {
            AddressableAssetEntry entry = new AddressableAssetEntry("12345698655", "Entry", null, false);
            Type providerType           = entry.GetRuntimeProviderType(testProviderType.FullName, null);

            Assert.AreEqual(testProviderType, providerType);
        }
Esempio n. 2
0
        public void GetRuntimeProviderType_ReturnsProviderTypeForNonAtlas(Type testProviderType)
        {
            AddressableAssetEntry entry = new AddressableAssetEntry("12345698655", "Entry", null, false);
            Type providerType           = entry.GetRuntimeProviderType(testProviderType.FullName, typeof(GameObject));

            Assert.AreEqual(testProviderType, providerType);
        }
Esempio n. 3
0
        public void GetRuntimeProviderType_HandlesInvalidProviderString()
        {
            AddressableAssetEntry entry = new AddressableAssetEntry("12345698655", "Entry", null, false);
            Type providerType           = entry.GetRuntimeProviderType("NotARealProvider", typeof(GameObject));

            Assert.IsNull(providerType);
        }
Esempio n. 4
0
        public void GetRuntimeProviderType_ReturnsAtlasProviderForSpriteAtlas()
        {
            AddressableAssetEntry entry = new AddressableAssetEntry("12345698655", "Entry", null, false);
            Type providerType           = entry.GetRuntimeProviderType(typeof(AssetDatabaseProvider).FullName, typeof(SpriteAtlas));

            Assert.AreEqual(typeof(AtlasSpriteProvider), providerType);
        }