【m】框架大更新
This commit is contained in:
8
Assets/03.YooAsset/Samples~/Test Sample/Editor.meta
Normal file
8
Assets/03.YooAsset/Samples~/Test Sample/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 909bee821e6d3154f917c21d62983a3f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,181 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
using YooAsset.Editor;
|
||||
|
||||
public static class TestPackageBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// 构建资源包
|
||||
/// </summary>
|
||||
public static PackageInvokeBuildResult BuildPackage(PackageInvokeBuildParam buildParam)
|
||||
{
|
||||
string packageName = buildParam.PackageName;
|
||||
string buildPipelineName = buildParam.BuildPipelineName;
|
||||
|
||||
if (buildPipelineName == EBuildPipeline.EditorSimulateBuildPipeline.ToString())
|
||||
{
|
||||
string projectPath = EditorTools.GetProjectPath();
|
||||
string outputRoot = $"{projectPath}/Bundles/Tester_ESBP";
|
||||
|
||||
var buildParameters = new EditorSimulateBuildParameters();
|
||||
buildParameters.BuildOutputRoot = outputRoot;
|
||||
buildParameters.BuildinFileRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot();
|
||||
buildParameters.BuildPipeline = EBuildPipeline.EditorSimulateBuildPipeline.ToString();
|
||||
buildParameters.BuildBundleType = (int)EBuildBundleType.VirtualBundle;
|
||||
buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
buildParameters.PackageName = packageName;
|
||||
buildParameters.PackageVersion = "TestVersion";
|
||||
buildParameters.FileNameStyle = EFileNameStyle.HashName;
|
||||
buildParameters.BuildinFileCopyOption = EBuildinFileCopyOption.None;
|
||||
buildParameters.BuildinFileCopyParams = string.Empty;
|
||||
buildParameters.ClearBuildCacheFiles = true;
|
||||
buildParameters.UseAssetDependencyDB = true;
|
||||
|
||||
var pipeline = new EditorSimulateBuildPipeline();
|
||||
BuildResult buildResult = pipeline.Run(buildParameters, false);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
var reulst = new PackageInvokeBuildResult();
|
||||
reulst.PackageRootDirectory = buildResult.OutputPackageDirectory;
|
||||
return reulst;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(buildResult.ErrorInfo);
|
||||
throw new System.Exception($"{nameof(EditorSimulateBuildPipeline)} build failed !");
|
||||
}
|
||||
}
|
||||
else if (buildPipelineName == EBuildPipeline.ScriptableBuildPipeline.ToString())
|
||||
{
|
||||
string projectPath = EditorTools.GetProjectPath();
|
||||
string outputRoot = $"{projectPath}/Bundles/Tester_SBP";
|
||||
|
||||
// 内置着色器资源包名称
|
||||
var builtinShaderBundleName = GetBuiltinShaderBundleName(packageName);
|
||||
var buildParameters = new ScriptableBuildParameters();
|
||||
|
||||
buildParameters.BuildOutputRoot = outputRoot;
|
||||
buildParameters.BuildinFileRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot();
|
||||
buildParameters.BuildPipeline = EBuildPipeline.ScriptableBuildPipeline.ToString();
|
||||
buildParameters.BuildBundleType = (int)EBuildBundleType.AssetBundle;
|
||||
buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
buildParameters.PackageName = packageName;
|
||||
buildParameters.PackageVersion = "TestVersion";
|
||||
buildParameters.EnableSharePackRule = true;
|
||||
buildParameters.VerifyBuildingResult = true;
|
||||
buildParameters.FileNameStyle = EFileNameStyle.HashName;
|
||||
buildParameters.BuildinFileCopyOption = EBuildinFileCopyOption.None;
|
||||
buildParameters.BuildinFileCopyParams = string.Empty;
|
||||
buildParameters.CompressOption = ECompressOption.LZ4;
|
||||
buildParameters.ClearBuildCacheFiles = true;
|
||||
buildParameters.UseAssetDependencyDB = true;
|
||||
buildParameters.BuiltinShadersBundleName = builtinShaderBundleName;
|
||||
buildParameters.EncryptionServices = new TestFileStreamEncryption();
|
||||
buildParameters.ManifestProcessServices = new TestProcessManifest();
|
||||
buildParameters.ManifestRestoreServices = new TestRestoreManifest();
|
||||
|
||||
var pipeline = new ScriptableBuildPipeline();
|
||||
BuildResult buildResult = pipeline.Run(buildParameters, false);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
var reulst = new PackageInvokeBuildResult();
|
||||
reulst.PackageRootDirectory = buildResult.OutputPackageDirectory;
|
||||
return reulst;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(buildResult.ErrorInfo);
|
||||
throw new System.Exception($"{nameof(ScriptableBuildPipeline)} build failed !");
|
||||
}
|
||||
}
|
||||
else if (buildPipelineName == EBuildPipeline.BuiltinBuildPipeline.ToString())
|
||||
{
|
||||
string projectPath = EditorTools.GetProjectPath();
|
||||
string outputRoot = $"{projectPath}/Bundles/Tester_BBP";
|
||||
|
||||
var buildParameters = new BuiltinBuildParameters();
|
||||
buildParameters.BuildOutputRoot = outputRoot;
|
||||
buildParameters.BuildinFileRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot();
|
||||
buildParameters.BuildPipeline = EBuildPipeline.ScriptableBuildPipeline.ToString();
|
||||
buildParameters.BuildBundleType = (int)EBuildBundleType.AssetBundle;
|
||||
buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
buildParameters.PackageName = packageName;
|
||||
buildParameters.PackageVersion = "TestVersion";
|
||||
buildParameters.EnableSharePackRule = true;
|
||||
buildParameters.VerifyBuildingResult = true;
|
||||
buildParameters.FileNameStyle = EFileNameStyle.HashName;
|
||||
buildParameters.BuildinFileCopyOption = EBuildinFileCopyOption.None;
|
||||
buildParameters.BuildinFileCopyParams = string.Empty;
|
||||
buildParameters.CompressOption = ECompressOption.LZ4;
|
||||
buildParameters.ClearBuildCacheFiles = true;
|
||||
buildParameters.UseAssetDependencyDB = true;
|
||||
buildParameters.EncryptionServices = new TestFileStreamEncryption();
|
||||
buildParameters.ManifestProcessServices = new TestProcessManifest();
|
||||
buildParameters.ManifestRestoreServices = new TestRestoreManifest();
|
||||
|
||||
var pipeline = new BuiltinBuildPipeline();
|
||||
BuildResult buildResult = pipeline.Run(buildParameters, false);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
var reulst = new PackageInvokeBuildResult();
|
||||
reulst.PackageRootDirectory = buildResult.OutputPackageDirectory;
|
||||
return reulst;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(buildResult.ErrorInfo);
|
||||
throw new System.Exception($"{nameof(BuiltinBuildPipeline)} build failed !");
|
||||
}
|
||||
}
|
||||
else if (buildPipelineName == EBuildPipeline.RawFileBuildPipeline.ToString())
|
||||
{
|
||||
string projectPath = EditorTools.GetProjectPath();
|
||||
string outputRoot = $"{projectPath}/Bundles/Tester_RFBP";
|
||||
|
||||
var buildParameters = new RawFileBuildParameters();
|
||||
buildParameters.BuildOutputRoot = outputRoot;
|
||||
buildParameters.BuildinFileRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot();
|
||||
buildParameters.BuildPipeline = EBuildPipeline.RawFileBuildPipeline.ToString();
|
||||
buildParameters.BuildBundleType = (int)EBuildBundleType.RawBundle;
|
||||
buildParameters.BuildTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
buildParameters.PackageName = packageName;
|
||||
buildParameters.PackageVersion = "TestVersion";
|
||||
buildParameters.VerifyBuildingResult = true;
|
||||
buildParameters.FileNameStyle = EFileNameStyle.HashName;
|
||||
buildParameters.BuildinFileCopyOption = EBuildinFileCopyOption.None;
|
||||
buildParameters.BuildinFileCopyParams = string.Empty;
|
||||
buildParameters.ClearBuildCacheFiles = true;
|
||||
buildParameters.UseAssetDependencyDB = true;
|
||||
|
||||
var pipeline = new RawFileBuildPipeline();
|
||||
BuildResult buildResult = pipeline.Run(buildParameters, false);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
var reulst = new PackageInvokeBuildResult();
|
||||
reulst.PackageRootDirectory = buildResult.OutputPackageDirectory;
|
||||
return reulst;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(buildResult.ErrorInfo);
|
||||
throw new System.Exception($"{nameof(RawFileBuildPipeline)} build failed !");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new System.NotImplementedException(buildPipelineName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 内置着色器资源包名称
|
||||
/// 注意:和自动收集的着色器资源包名保持一致!
|
||||
/// </summary>
|
||||
private static string GetBuiltinShaderBundleName(string packageName)
|
||||
{
|
||||
var uniqueBundleName = AssetBundleCollectorSettingData.Setting.UniqueBundleName;
|
||||
var packRuleResult = DefaultPackRule.CreateShadersPackRuleResult();
|
||||
return packRuleResult.GetBundleName(packageName, uniqueBundleName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 339682333f36d014e942a790dea6b1f7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "YooAsset.Test.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"YooAsset",
|
||||
"YooAsset.Editor",
|
||||
"YooAsset.Test"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02d972ebdd15a8241a50cd49aae31b37
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/03.YooAsset/Samples~/Test Sample/Runtime.meta
Normal file
8
Assets/03.YooAsset/Samples~/Test Sample/Runtime.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a97de04ee53aa144bed1f43c5c9efdf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ce11d98eccfa4b44bf2c82f7d87d105
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 文件偏移加密方式
|
||||
/// </summary>
|
||||
public class TestFileOffsetEncryption : IEncryptionServices
|
||||
{
|
||||
public EncryptResult Encrypt(EncryptFileInfo fileInfo)
|
||||
{
|
||||
// 说明:对TestRes3资源目录进行加密
|
||||
if (fileInfo.BundleName.Contains("_testres3_"))
|
||||
{
|
||||
int offset = 32;
|
||||
byte[] fileData = File.ReadAllBytes(fileInfo.FileLoadPath);
|
||||
var encryptedData = new byte[fileData.Length + offset];
|
||||
Buffer.BlockCopy(fileData, 0, encryptedData, offset, fileData.Length);
|
||||
|
||||
EncryptResult result = new EncryptResult();
|
||||
result.Encrypted = true;
|
||||
result.EncryptedData = encryptedData;
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
EncryptResult result = new EncryptResult();
|
||||
result.Encrypted = false;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资源文件偏移解密类
|
||||
/// </summary>
|
||||
public class TestFileOffsetDecryption : IDecryptionServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步方式获取解密的资源包对象
|
||||
/// 注意:加载流对象在资源包对象释放的时候会自动释放
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundle(DecryptFileInfo fileInfo)
|
||||
{
|
||||
DecryptResult decryptResult = new DecryptResult();
|
||||
decryptResult.ManagedStream = null;
|
||||
decryptResult.Result = AssetBundle.LoadFromFile(fileInfo.FileLoadPath, fileInfo.FileLoadCRC, GetFileOffset());
|
||||
return decryptResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步方式获取解密的资源包对象
|
||||
/// 注意:加载流对象在资源包对象释放的时候会自动释放
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundleAsync(DecryptFileInfo fileInfo)
|
||||
{
|
||||
DecryptResult decryptResult = new DecryptResult();
|
||||
decryptResult.ManagedStream = null;
|
||||
decryptResult.CreateRequest = AssetBundle.LoadFromFileAsync(fileInfo.FileLoadPath, fileInfo.FileLoadCRC, GetFileOffset());
|
||||
return decryptResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后备方式获取解密的资源包对象
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundleFallback(DecryptFileInfo fileInfo)
|
||||
{
|
||||
return new DecryptResult();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取解密的字节数据
|
||||
/// </summary>
|
||||
byte[] IDecryptionServices.ReadFileData(DecryptFileInfo fileInfo)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取解密的文本数据
|
||||
/// </summary>
|
||||
string IDecryptionServices.ReadFileText(DecryptFileInfo fileInfo)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private static ulong GetFileOffset()
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 174e56f3a30d7fd4e80bde43ba267631
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,159 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 资源文件解密流
|
||||
/// </summary>
|
||||
public class BundleStream : FileStream
|
||||
{
|
||||
public const byte KEY = 64;
|
||||
|
||||
public BundleStream(string path, FileMode mode, FileAccess access, FileShare share) : base(path, mode, access, share)
|
||||
{
|
||||
}
|
||||
public BundleStream(string path, FileMode mode) : base(path, mode)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Read(byte[] array, int offset, int count)
|
||||
{
|
||||
var index = base.Read(array, offset, count);
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] ^= KEY;
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件流加密方式
|
||||
/// </summary>
|
||||
public class TestFileStreamEncryption : IEncryptionServices
|
||||
{
|
||||
public EncryptResult Encrypt(EncryptFileInfo fileInfo)
|
||||
{
|
||||
// 说明:对TestRes3资源目录进行加密
|
||||
if (fileInfo.BundleName.Contains("_testres3_"))
|
||||
{
|
||||
var fileData = File.ReadAllBytes(fileInfo.FileLoadPath);
|
||||
for (int i = 0; i < fileData.Length; i++)
|
||||
{
|
||||
fileData[i] ^= BundleStream.KEY;
|
||||
}
|
||||
|
||||
EncryptResult result = new EncryptResult();
|
||||
result.Encrypted = true;
|
||||
result.EncryptedData = fileData;
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
EncryptResult result = new EncryptResult();
|
||||
result.Encrypted = false;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资源文件流解密类
|
||||
/// </summary>
|
||||
public class TestFileStreamDecryption : IDecryptionServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步方式获取解密的资源包对象
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundle(DecryptFileInfo fileInfo)
|
||||
{
|
||||
BundleStream bundleStream = new BundleStream(fileInfo.FileLoadPath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
DecryptResult decryptResult = new DecryptResult();
|
||||
decryptResult.ManagedStream = bundleStream;
|
||||
decryptResult.Result = AssetBundle.LoadFromStream(bundleStream, fileInfo.FileLoadCRC, GetManagedReadBufferSize());
|
||||
return decryptResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步方式获取解密的资源包对象
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundleAsync(DecryptFileInfo fileInfo)
|
||||
{
|
||||
BundleStream bundleStream = new BundleStream(fileInfo.FileLoadPath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
DecryptResult decryptResult = new DecryptResult();
|
||||
decryptResult.ManagedStream = bundleStream;
|
||||
decryptResult.CreateRequest = AssetBundle.LoadFromStreamAsync(bundleStream, fileInfo.FileLoadCRC, GetManagedReadBufferSize());
|
||||
return decryptResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后备方式获取解密的资源包
|
||||
/// 注意:当正常解密方法失败后,会触发后备加载!
|
||||
/// 说明:建议通过LoadFromMemory()方法加载资源包作为保底机制。
|
||||
/// </summary>
|
||||
DecryptResult IDecryptionServices.LoadAssetBundleFallback(DecryptFileInfo fileInfo)
|
||||
{
|
||||
byte[] fileData = File.ReadAllBytes(fileInfo.FileLoadPath);
|
||||
var assetBundle = AssetBundle.LoadFromMemory(fileData);
|
||||
DecryptResult decryptResult = new DecryptResult();
|
||||
decryptResult.Result = assetBundle;
|
||||
return decryptResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取解密的字节数据
|
||||
/// </summary>
|
||||
byte[] IDecryptionServices.ReadFileData(DecryptFileInfo fileInfo)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取解密的文本数据
|
||||
/// </summary>
|
||||
string IDecryptionServices.ReadFileText(DecryptFileInfo fileInfo)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private static uint GetManagedReadBufferSize()
|
||||
{
|
||||
return 1024;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WebGL平台解密类
|
||||
/// 注意:WebGL平台支持内存解密
|
||||
/// </summary>
|
||||
public class TestWebFileMemoryDecryption : IWebDecryptionServices
|
||||
{
|
||||
public WebDecryptResult LoadAssetBundle(WebDecryptFileInfo fileInfo)
|
||||
{
|
||||
/*
|
||||
byte[] copyData = new byte[fileInfo.FileData.Length];
|
||||
Buffer.BlockCopy(fileInfo.FileData, 0, copyData, 0, fileInfo.FileData.Length);
|
||||
|
||||
for (int i = 0; i < copyData.Length; i++)
|
||||
{
|
||||
copyData[i] ^= BundleStream.KEY;
|
||||
}
|
||||
|
||||
WebDecryptResult decryptResult = new WebDecryptResult();
|
||||
decryptResult.Result = AssetBundle.LoadFromMemory(copyData);
|
||||
return decryptResult;
|
||||
*/
|
||||
|
||||
for (int i = 0; i < fileInfo.FileData.Length; i++)
|
||||
{
|
||||
fileInfo.FileData[i] ^= BundleStream.KEY;
|
||||
}
|
||||
|
||||
WebDecryptResult decryptResult = new WebDecryptResult();
|
||||
decryptResult.Result = AssetBundle.LoadFromMemory(fileInfo.FileData);
|
||||
return decryptResult;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d264e4255e837db41900a9a54bd828f4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestProcessManifest : IManifestProcessServices
|
||||
{
|
||||
byte[] IManifestProcessServices.ProcessManifest(byte[] fileData)
|
||||
{
|
||||
return XorCrypto.Crypto(fileData, "YOO");
|
||||
}
|
||||
}
|
||||
|
||||
public class TestRestoreManifest : IManifestRestoreServices
|
||||
{
|
||||
byte[] IManifestRestoreServices.RestoreManifest(byte[] fileData)
|
||||
{
|
||||
return XorCrypto.Crypto(fileData, "YOO");
|
||||
}
|
||||
}
|
||||
|
||||
public class XorCrypto
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用异或加密/解密字节数组
|
||||
/// </summary>
|
||||
/// <param name="data">输入数据</param>
|
||||
/// <param name="key">加密密钥</param>
|
||||
/// <returns>处理后的字节数组</returns>
|
||||
public static byte[] Crypto(byte[] data, byte[] key)
|
||||
{
|
||||
if (data == null)
|
||||
throw new ArgumentNullException(nameof(data));
|
||||
|
||||
if (key == null || key.Length == 0)
|
||||
throw new ArgumentException("Key cannot be null or empty");
|
||||
|
||||
byte[] result = new byte[data.Length];
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
// 循环使用密钥中的字节
|
||||
result[i] = (byte)(data[i] ^ key[i % key.Length]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用字符串密钥进行异或处理(自动转换编码)
|
||||
/// </summary>
|
||||
/// <param name="data">输入数据</param>
|
||||
/// <param name="key">字符串密钥</param>
|
||||
/// <returns>处理后的字节数组</returns>
|
||||
public static byte[] Crypto(byte[] data, string key)
|
||||
{
|
||||
byte[] keyBytes = System.Text.Encoding.UTF8.GetBytes(key);
|
||||
return Crypto(data, keyBytes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 437432f4d3838124085c13253d0c0094
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b6c0cef725372943a5938f3fa73743b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class T0_InitYooAssets : IPrebuildSetup, IPostBuildCleanup
|
||||
{
|
||||
void IPrebuildSetup.Setup()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
// 清空旧数据
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.ClearAll();
|
||||
|
||||
// 创建包裹配置
|
||||
CreateAssetBundlePackageCollector();
|
||||
CreateRawBundlePackageCollector();
|
||||
|
||||
// 修正配置路径为空导致的错误
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.FixFile();
|
||||
#endif
|
||||
}
|
||||
void IPostBuildCleanup.Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private static void CreateAssetBundlePackageCollector()
|
||||
{
|
||||
// 创建AssetBundlePackage
|
||||
var testPackage = YooAsset.Editor.AssetBundleCollectorSettingData.CreatePackage(TestDefine.AssetBundlePackageName);
|
||||
testPackage.EnableAddressable = true;
|
||||
testPackage.AutoCollectShaders = true;
|
||||
testPackage.IgnoreRuleName = "NormalIgnoreRule";
|
||||
|
||||
// 音频
|
||||
var audioGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "AudioGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "bbce3e09a17b55c46b5615e995b5fc70"; //TestRes/Audios目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(audioGroup, collector1);
|
||||
}
|
||||
|
||||
// 图片
|
||||
var imageGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "ImageGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "d4768b7c3d3101d4ea693f95b337861d"; //TestRes/Image目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(imageGroup, collector1);
|
||||
}
|
||||
|
||||
// 图集
|
||||
var spriteGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "SpriteGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "634f8145b892c554ba440c212b36a933"; //TestRes/SpriteAtlas目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(spriteGroup, collector1);
|
||||
|
||||
var collector2 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector2.CollectPath = "";
|
||||
collector2.CollectorGUID = "e41a9b5f04378154f9bd69ac5d52ec44"; //TestRes/Sprites目录
|
||||
collector2.CollectorType = YooAsset.Editor.ECollectorType.StaticAssetCollector;
|
||||
collector2.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(spriteGroup, collector2);
|
||||
}
|
||||
|
||||
// 面板
|
||||
var panelGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "PanelGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "4e9a00d6e825d644b9be75155d88daa6"; //TestRes/Panel目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(panelGroup, collector1);
|
||||
}
|
||||
|
||||
// 预制体
|
||||
var prefabGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "PrefabGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "8da7a00d90270b44898e9b165f86f005"; //TestRes/Prefab目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(prefabGroup, collector1);
|
||||
}
|
||||
|
||||
// 场景
|
||||
var sceneGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "SceneGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "3e169b07999abb0489113f5f4c015c89"; //TestRes/Scene目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(sceneGroup, collector1);
|
||||
}
|
||||
|
||||
// 序列化文件
|
||||
var scriptableObjectGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "ScriptableObjectGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "af885cf1a7abb8c44bd9d139409d2961"; //TestRes/ScriptableObject目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(scriptableObjectGroup, collector1);
|
||||
}
|
||||
|
||||
// 引用测试文件
|
||||
var referenceGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "ReferenceGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "26b9f7e0454f2bc4a84b44a018075d8f"; //TestRes2/PanelA目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(referenceGroup, collector1);
|
||||
|
||||
var collector2 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector2.CollectPath = "";
|
||||
collector2.CollectorGUID = "b5cace4be4d008e408c0738f157708a0"; //TestRes2/PanelB目录
|
||||
collector2.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector2.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(referenceGroup, collector2);
|
||||
|
||||
var collector3 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector3.CollectPath = "";
|
||||
collector3.CollectorGUID = "aa7f70ef09d60844ba62f85ff2414a9c"; //TestRes2/PanelAImage目录
|
||||
collector3.CollectorType = YooAsset.Editor.ECollectorType.DependAssetCollector;
|
||||
collector3.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(referenceGroup, collector3);
|
||||
|
||||
var collector4 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector4.CollectPath = "";
|
||||
collector4.CollectorGUID = "96d800f068cc69c4dbd20ffdcec40920"; //TestRes2/PanelBImage目录
|
||||
collector4.CollectorType = YooAsset.Editor.ECollectorType.DependAssetCollector;
|
||||
collector4.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(referenceGroup, collector4);
|
||||
|
||||
var collector5 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector5.CollectPath = "";
|
||||
collector5.CollectorGUID = "4264f3aa222d7f548a028d6c3411b1b0"; //TestRes2/PanelMat目录
|
||||
collector5.CollectorType = YooAsset.Editor.ECollectorType.DependAssetCollector;
|
||||
collector5.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(referenceGroup, collector5);
|
||||
}
|
||||
|
||||
// 加密测试文件
|
||||
var encryptGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "EncryptGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "e082d492b9da65e499cee3495be3645d"; //TestRes3/encrypt目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(encryptGroup, collector1);
|
||||
|
||||
var collector2 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector2.CollectPath = "";
|
||||
collector2.CollectorGUID = "35f454fb80a715047bcf0ce30c7c4f18"; //TestRes3/import目录
|
||||
collector2.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector2.AssetTags = "import";
|
||||
collector2.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(encryptGroup, collector2);
|
||||
|
||||
var collector3 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector3.CollectPath = "";
|
||||
collector3.CollectorGUID = "401af1ca0abf3ae4594631e5f71bfe27"; //TestRes3/unpack目录
|
||||
collector3.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector3.AssetTags = "unpack";
|
||||
collector3.PackRuleName = nameof(YooAsset.Editor.PackSeparately);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(encryptGroup, collector3);
|
||||
}
|
||||
|
||||
// 卸载测试文件
|
||||
var unloadGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(testPackage, "UnloadGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "c8cebdb7cd80a4044b15a1522363bb86"; //TestRes4/Enemy目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(unloadGroup, collector1);
|
||||
|
||||
var collector2 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector2.CollectPath = "";
|
||||
collector2.CollectorGUID = "3ba9252bc0a278145a7bde0cf876cbcb"; //TestRes4/EnemyImage目录
|
||||
collector2.CollectorType = YooAsset.Editor.ECollectorType.DependAssetCollector;
|
||||
collector2.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(unloadGroup, collector2);
|
||||
|
||||
var collector3 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector3.CollectPath = "";
|
||||
collector3.CollectorGUID = "65cc88e038c61ec488be24b82c4e2937"; //TestRes4/EnemyMat目录
|
||||
collector3.CollectorType = YooAsset.Editor.ECollectorType.DependAssetCollector;
|
||||
collector3.PackRuleName = nameof(YooAsset.Editor.PackDirectory);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(unloadGroup, collector3);
|
||||
}
|
||||
}
|
||||
private static void CreateRawBundlePackageCollector()
|
||||
{
|
||||
// 创建RawBundlePackage
|
||||
var rawPackage = YooAsset.Editor.AssetBundleCollectorSettingData.CreatePackage(TestDefine.RawBundlePackageName);
|
||||
rawPackage.EnableAddressable = true;
|
||||
rawPackage.AutoCollectShaders = true;
|
||||
rawPackage.IgnoreRuleName = "RawFileIgnoreRule";
|
||||
|
||||
// 原生文件
|
||||
var rawFileGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(rawPackage, "RawFileGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "fddaaf9430e24344196cc82ac3d006b4"; //TestRes/RawFiles目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackRawFile);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(rawFileGroup, collector1);
|
||||
}
|
||||
|
||||
// 视频文件
|
||||
var videoFileGroup = YooAsset.Editor.AssetBundleCollectorSettingData.CreateGroup(rawPackage, "VideoFileGroup");
|
||||
{
|
||||
var collector1 = new YooAsset.Editor.AssetBundleCollector();
|
||||
collector1.CollectPath = "";
|
||||
collector1.CollectorGUID = "9028a60fd472239448b89453084bfa0a"; //TestRes/Video目录
|
||||
collector1.CollectorType = YooAsset.Editor.ECollectorType.MainAssetCollector;
|
||||
collector1.PackRuleName = nameof(YooAsset.Editor.PackVideoFile);
|
||||
YooAsset.Editor.AssetBundleCollectorSettingData.CreateCollector(videoFileGroup, collector1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void InitializeYooAssets()
|
||||
{
|
||||
// 初始化YooAsset
|
||||
YooAssets.Initialize();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2d300bf1a8f8194f9748f4aaebf6e03
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4496f16afadc9b418cbbb8128272c44
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,190 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class T1_TestEditorFileSystem : IPrebuildSetup, IPostBuildCleanup
|
||||
{
|
||||
private const string ASSET_BUNDLE_PACKAGE_ROOT_KEY = "T1_ASSET_BUNDLE_PACKAGE_ROOT_KEY";
|
||||
private const string RAW_BUNDLE_PACKAGE_ROOT_KEY = "T1_RAW_BUNDLE_PACKAGE_ROOT_KEY";
|
||||
|
||||
void IPrebuildSetup.Setup()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
// 构建资源包
|
||||
{
|
||||
var simulateParams = new PackageInvokeBuildParam(TestDefine.AssetBundlePackageName);
|
||||
simulateParams.BuildPipelineName = "EditorSimulateBuildPipeline";
|
||||
simulateParams.InvokeAssmeblyName = "YooAsset.Test.Editor";
|
||||
simulateParams.InvokeClassFullName = "TestPackageBuilder";
|
||||
simulateParams.InvokeMethodName = "BuildPackage";
|
||||
var simulateResult = PackageInvokeBuilder.InvokeBuilder(simulateParams);
|
||||
UnityEditor.EditorPrefs.SetString(ASSET_BUNDLE_PACKAGE_ROOT_KEY, simulateResult.PackageRootDirectory);
|
||||
}
|
||||
|
||||
// 构建资源包
|
||||
{
|
||||
var simulateParams = new PackageInvokeBuildParam(TestDefine.RawBundlePackageName);
|
||||
simulateParams.BuildPipelineName = "EditorSimulateBuildPipeline";
|
||||
simulateParams.InvokeAssmeblyName = "YooAsset.Test.Editor";
|
||||
simulateParams.InvokeClassFullName = "TestPackageBuilder";
|
||||
simulateParams.InvokeMethodName = "BuildPackage";
|
||||
var simulateResult = PackageInvokeBuilder.InvokeBuilder(simulateParams);
|
||||
UnityEditor.EditorPrefs.SetString(RAW_BUNDLE_PACKAGE_ROOT_KEY, simulateResult.PackageRootDirectory);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void IPostBuildCleanup.Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator A_InitializePackage()
|
||||
{
|
||||
// 初始化资源包 ASSET_BUNDLE
|
||||
{
|
||||
string packageRoot = string.Empty;
|
||||
#if UNITY_EDITOR
|
||||
packageRoot = UnityEditor.EditorPrefs.GetString(ASSET_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
#endif
|
||||
if (Directory.Exists(packageRoot) == false)
|
||||
throw new Exception($"Not found package root : {packageRoot}");
|
||||
|
||||
var package = YooAssets.CreatePackage(TestDefine.AssetBundlePackageName);
|
||||
|
||||
// 初始化资源包
|
||||
var initParams = new EditorSimulateModeParameters();
|
||||
initParams.EditorFileSystemParameters = FileSystemParameters.CreateDefaultEditorFileSystemParameters(packageRoot);
|
||||
var initializeOp = package.InitializeAsync(initParams);
|
||||
yield return initializeOp;
|
||||
if (initializeOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(initializeOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, initializeOp.Status);
|
||||
|
||||
// 请求资源版本
|
||||
var requetVersionOp = package.RequestPackageVersionAsync();
|
||||
yield return requetVersionOp;
|
||||
if (requetVersionOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(requetVersionOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
// 更新资源清单
|
||||
var updateManifestOp = package.UpdatePackageManifestAsync(requetVersionOp.PackageVersion);
|
||||
yield return updateManifestOp;
|
||||
if (updateManifestOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(updateManifestOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, updateManifestOp.Status);
|
||||
}
|
||||
|
||||
// 初始化资源包 RAW_BUNDLE
|
||||
{
|
||||
string packageRoot = string.Empty;
|
||||
#if UNITY_EDITOR
|
||||
packageRoot = UnityEditor.EditorPrefs.GetString(RAW_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
#endif
|
||||
if (Directory.Exists(packageRoot) == false)
|
||||
throw new Exception($"Not found package root : {packageRoot}");
|
||||
|
||||
var package = YooAssets.CreatePackage(TestDefine.RawBundlePackageName);
|
||||
|
||||
// 初始化资源包
|
||||
var initParams = new EditorSimulateModeParameters();
|
||||
initParams.EditorFileSystemParameters = FileSystemParameters.CreateDefaultEditorFileSystemParameters(packageRoot);
|
||||
var initializeOp = package.InitializeAsync(initParams);
|
||||
yield return initializeOp;
|
||||
if (initializeOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(initializeOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, initializeOp.Status);
|
||||
|
||||
// 请求资源版本
|
||||
var requetVersionOp = package.RequestPackageVersionAsync();
|
||||
yield return requetVersionOp;
|
||||
if (requetVersionOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(requetVersionOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
// 更新资源清单
|
||||
var updateManifestOp = package.UpdatePackageManifestAsync(requetVersionOp.PackageVersion);
|
||||
yield return updateManifestOp;
|
||||
if (updateManifestOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(updateManifestOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, updateManifestOp.Status);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B1_TestAsyncTask()
|
||||
{
|
||||
var tester = new TestAsyncTask();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B2_TestLoadAsset()
|
||||
{
|
||||
var tester = new TestLoadAsset();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B3_TestLoadSubAssets()
|
||||
{
|
||||
var tester = new TestLoadSubAssets();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B4_TestLoadAllAssets()
|
||||
{
|
||||
var tester = new TestLoadAllAssets();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B5_TestLoadSpriteAtlas()
|
||||
{
|
||||
var tester = new TestLoadSpriteAtlas();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B6_TestLoadScriptableObject()
|
||||
{
|
||||
var tester = new TestLoadScriptableObject();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B7_TestLoadScene()
|
||||
{
|
||||
var tester = new TestLoadScene();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B8_TestLoadRawFile()
|
||||
{
|
||||
var tester = new TestLoadRawFile();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B9_TestLoadVideo()
|
||||
{
|
||||
var tester = new TestLoadVideo();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator D_DestroyPackage()
|
||||
{
|
||||
var tester = new TestDestroyPackage();
|
||||
yield return tester.RuntimeTester(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2415e48396659e46baabff3fcaad34d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c31d2ca48714ce4882e877397f638b0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,231 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class T2_TestBuldinFileSystem : IPrebuildSetup, IPostBuildCleanup
|
||||
{
|
||||
public const string ASSET_BUNDLE_PACKAGE_ROOT_KEY = "T2_ASSET_BUNDLE_PACKAGE_ROOT_KEY";
|
||||
public const string RAW_BUNDLE_PACKAGE_ROOT_KEY = "T2_RAW_BUNDLE_PACKAGE_ROOT_KEY";
|
||||
|
||||
void IPrebuildSetup.Setup()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
// 构建AssetBundlePackage
|
||||
{
|
||||
var buildParams = new PackageInvokeBuildParam(TestDefine.AssetBundlePackageName);
|
||||
buildParams.BuildPipelineName = "ScriptableBuildPipeline";
|
||||
buildParams.InvokeAssmeblyName = "YooAsset.Test.Editor";
|
||||
buildParams.InvokeClassFullName = "TestPackageBuilder";
|
||||
buildParams.InvokeMethodName = "BuildPackage";
|
||||
var simulateResult = PackageInvokeBuilder.InvokeBuilder(buildParams);
|
||||
UnityEditor.EditorPrefs.SetString(ASSET_BUNDLE_PACKAGE_ROOT_KEY, simulateResult.PackageRootDirectory);
|
||||
}
|
||||
|
||||
// 构建RawBundlePackage
|
||||
{
|
||||
var buildParams = new PackageInvokeBuildParam(TestDefine.RawBundlePackageName);
|
||||
buildParams.BuildPipelineName = "RawFileBuildPipeline";
|
||||
buildParams.InvokeAssmeblyName = "YooAsset.Test.Editor";
|
||||
buildParams.InvokeClassFullName = "TestPackageBuilder";
|
||||
buildParams.InvokeMethodName = "BuildPackage";
|
||||
var simulateResult = PackageInvokeBuilder.InvokeBuilder(buildParams);
|
||||
UnityEditor.EditorPrefs.SetString(RAW_BUNDLE_PACKAGE_ROOT_KEY, simulateResult.PackageRootDirectory);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void IPostBuildCleanup.Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator A_InitializePackage()
|
||||
{
|
||||
// 初始化资源包 ASSET_BUNDLE
|
||||
{
|
||||
string packageRoot = string.Empty;
|
||||
#if UNITY_EDITOR
|
||||
packageRoot = UnityEditor.EditorPrefs.GetString(ASSET_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
#endif
|
||||
if (Directory.Exists(packageRoot) == false)
|
||||
throw new Exception($"Not found package root : {packageRoot}");
|
||||
|
||||
var package = YooAssets.CreatePackage(TestDefine.AssetBundlePackageName);
|
||||
|
||||
// 初始化资源包
|
||||
var initParams = new OfflinePlayModeParameters();
|
||||
var fileDecryption = new TestFileStreamDecryption();
|
||||
var manifestServices = new TestRestoreManifest();
|
||||
initParams.BuildinFileSystemParameters = FileSystemParameters.CreateDefaultBuildinFileSystemParameters(fileDecryption, packageRoot);
|
||||
initParams.BuildinFileSystemParameters.AddParameter(FileSystemParametersDefine.DISABLE_CATALOG_FILE, true);
|
||||
initParams.BuildinFileSystemParameters.AddParameter(FileSystemParametersDefine.MANIFEST_SERVICES, manifestServices);
|
||||
var initializeOp = package.InitializeAsync(initParams);
|
||||
yield return initializeOp;
|
||||
if (initializeOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(initializeOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, initializeOp.Status);
|
||||
|
||||
// 请求资源版本
|
||||
var requetVersionOp = package.RequestPackageVersionAsync();
|
||||
yield return requetVersionOp;
|
||||
if (requetVersionOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(requetVersionOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
// 更新资源清单
|
||||
var updateManifestOp = package.UpdatePackageManifestAsync(requetVersionOp.PackageVersion);
|
||||
yield return updateManifestOp;
|
||||
if (updateManifestOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(updateManifestOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, updateManifestOp.Status);
|
||||
}
|
||||
|
||||
// 初始化资源包 RAW_BUNDLE
|
||||
{
|
||||
string packageRoot = string.Empty;
|
||||
#if UNITY_EDITOR
|
||||
packageRoot = UnityEditor.EditorPrefs.GetString(RAW_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
#endif
|
||||
if (Directory.Exists(packageRoot) == false)
|
||||
throw new Exception($"Not found package root : {packageRoot}");
|
||||
|
||||
var package = YooAssets.CreatePackage(TestDefine.RawBundlePackageName);
|
||||
|
||||
// 初始化资源包
|
||||
var initParams = new OfflinePlayModeParameters();
|
||||
initParams.BuildinFileSystemParameters = FileSystemParameters.CreateDefaultBuildinFileSystemParameters(null, packageRoot);
|
||||
initParams.BuildinFileSystemParameters.AddParameter(FileSystemParametersDefine.APPEND_FILE_EXTENSION, true);
|
||||
initParams.BuildinFileSystemParameters.AddParameter(FileSystemParametersDefine.DISABLE_CATALOG_FILE, true);
|
||||
var initializeOp = package.InitializeAsync(initParams);
|
||||
yield return initializeOp;
|
||||
if (initializeOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(initializeOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, initializeOp.Status);
|
||||
|
||||
// 请求资源版本
|
||||
var requetVersionOp = package.RequestPackageVersionAsync();
|
||||
yield return requetVersionOp;
|
||||
if (requetVersionOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(requetVersionOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
// 更新资源清单
|
||||
var updateManifestOp = package.UpdatePackageManifestAsync(requetVersionOp.PackageVersion);
|
||||
yield return updateManifestOp;
|
||||
if (updateManifestOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(updateManifestOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, updateManifestOp.Status);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B1_TestAsyncTask()
|
||||
{
|
||||
var tester = new TestAsyncTask();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B2_TestLoadAsset()
|
||||
{
|
||||
var tester = new TestLoadAsset();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B3_TestLoadSubAssets()
|
||||
{
|
||||
var tester = new TestLoadSubAssets();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B4_TestLoadAllAssets()
|
||||
{
|
||||
var tester = new TestLoadAllAssets();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B5_TestLoadSpriteAtlas()
|
||||
{
|
||||
var tester = new TestLoadSpriteAtlas();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B6_TestLoadScriptableObject()
|
||||
{
|
||||
var tester = new TestLoadScriptableObject();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B7_TestLoadScene()
|
||||
{
|
||||
var tester = new TestLoadScene();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B8_TestLoadRawFile()
|
||||
{
|
||||
var tester = new TestLoadRawFile();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator B9_TestLoadVideo()
|
||||
{
|
||||
var tester = new TestLoadVideo();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C1_TestGetAssetInfos()
|
||||
{
|
||||
var tester = new TestGetAssetInfos();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C2_TestBundleEncryption()
|
||||
{
|
||||
var tester = new TestBundleEncryption();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C3_TestBundleUnpacker()
|
||||
{
|
||||
var tester = new TestBundleUnpacker();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C4_TestBundleReference()
|
||||
{
|
||||
var tester = new TestBundleReference();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C4_TestBundleUnload()
|
||||
{
|
||||
var tester = new TestBundleUnload();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator D_DestroyPackage()
|
||||
{
|
||||
var tester = new TestDestroyPackage();
|
||||
yield return tester.RuntimeTester(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcc55b0010a446748977341328325575
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 测试加载加密文件
|
||||
/// </summary>
|
||||
public class TestBundleEncryption
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载加密的预制体
|
||||
// 说明:测试内置文件解压
|
||||
{
|
||||
var assetHandle = package.LoadAssetAsync<GameObject>("prefab_encryptA");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var go = assetHandle.InstantiateSync(Vector3.zero, Quaternion.identity);
|
||||
Assert.IsNotNull(go);
|
||||
}
|
||||
|
||||
// 同步加载加密的预制体
|
||||
// 说明:测试内置文件解压
|
||||
{
|
||||
var assetHandle = package.LoadAssetSync<GameObject>("prefab_encryptB");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var go = assetHandle.InstantiateSync(Vector3.zero, Quaternion.identity);
|
||||
Assert.IsNotNull(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 资源代码流程
|
||||
* 内置文件解压(加载器触发)
|
||||
BuildinFileSystem::LoadBundleFile()
|
||||
{
|
||||
if (IsUnpackBundleFile(bundle))
|
||||
{
|
||||
_unpackFileSystem.LoadBundleFile(bundle);
|
||||
}
|
||||
}
|
||||
UnpackFileSystem::LoadBundleFile()
|
||||
{
|
||||
var operation = new DCFSLoadAssetBundleOperation(this, bundle);
|
||||
return operation;
|
||||
}
|
||||
DCFSLoadAssetBundleOperation::InternalUpdate()
|
||||
{
|
||||
if (_steps == ESteps.DownloadFile)
|
||||
{
|
||||
DownloadFileOptions options = new DownloadFileOptions(int.MaxValue);
|
||||
_unpackFileSystem.DownloadFileAsync(_bundle, options);
|
||||
}
|
||||
}
|
||||
UnpackFileSystem::DownloadFileAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath))
|
||||
{
|
||||
//RemoteServices返回内置文件路径
|
||||
string mainURL = RemoteServices.GetRemoteMainURL(bundle.FileName);
|
||||
string fallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName);
|
||||
options.SetURL(mainURL, fallbackURL);
|
||||
var downloader = new DownloadPackageBundleOperation(bundle, options);
|
||||
return downloader;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e7786f8fc24d464d89b91d575076759
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestBundleReference
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 加载HeroA
|
||||
{
|
||||
var assetHandle = package.LoadAssetAsync<GameObject>("hero_a");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var pos = new Vector3(-1, -1, 0);
|
||||
var go = assetHandle.InstantiateSync(pos, Quaternion.identity);
|
||||
Assert.IsNotNull(go);
|
||||
}
|
||||
|
||||
// 加载HeroB
|
||||
AssetHandle heroHandle;
|
||||
GameObject heroObject;
|
||||
{
|
||||
heroHandle = package.LoadAssetAsync<GameObject>("hero_b");
|
||||
yield return heroHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, heroHandle.Status);
|
||||
|
||||
var pos = new Vector3(1, -1, 0);
|
||||
heroObject = heroHandle.InstantiateSync(pos, Quaternion.identity);
|
||||
Assert.IsNotNull(heroObject);
|
||||
}
|
||||
|
||||
// 卸载HeroB
|
||||
{
|
||||
heroHandle.Release();
|
||||
GameObject.Destroy(heroObject);
|
||||
yield return new WaitForEndOfFrame();
|
||||
}
|
||||
|
||||
// 清理未使用资源
|
||||
{
|
||||
var operation = package.UnloadUnusedAssetsAsync();
|
||||
yield return operation;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, operation.Status);
|
||||
}
|
||||
|
||||
// 再次加载HeroB
|
||||
{
|
||||
heroHandle = package.LoadAssetAsync<GameObject>("hero_b");
|
||||
yield return heroHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, heroHandle.Status);
|
||||
|
||||
var pos = new Vector3(1, -1, 0);
|
||||
heroObject = heroHandle.InstantiateSync(pos, Quaternion.identity);
|
||||
Assert.IsNotNull(heroObject);
|
||||
|
||||
// 检测材质球关联的纹理是否为空
|
||||
var mat = heroObject.GetComponent<MeshRenderer>().material;
|
||||
Assert.IsNotNull(mat.mainTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31ab830e018f9934f8b95ca1a63b3a03
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
using System.Linq;
|
||||
|
||||
public class TestBundleUnload
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
string targetBundleName = "assets_samples_test_sample_testres4_enemy.bundle";
|
||||
|
||||
// 加载Enemy
|
||||
AssetHandle assetHandle;
|
||||
{
|
||||
assetHandle = package.LoadAssetAsync<GameObject>("enemy");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
DebugPackageData debugData = package.GetDebugPackageData();
|
||||
var findItem = debugData.BundleInfos.Where(x => x.BundleName == targetBundleName);
|
||||
Assert.AreEqual(findItem.Count(), 1);
|
||||
}
|
||||
|
||||
// 卸载Enemy
|
||||
{
|
||||
assetHandle.Release();
|
||||
package.TryUnloadUnusedAsset("enemy");
|
||||
|
||||
DebugPackageData debugData = package.GetDebugPackageData();
|
||||
var findItem = debugData.BundleInfos.Where(x => x.BundleName == targetBundleName);
|
||||
Assert.AreEqual(findItem.Count(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9cf81becc940b94b98926a171bca520
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 测试内置文件解压
|
||||
/// </summary>
|
||||
public class TestBundleUnpacker
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
var resourceUnpacker = package.CreateResourceUnpacker("unpack", 10, 1);
|
||||
Assert.AreEqual(resourceUnpacker.TotalDownloadCount, 2);
|
||||
|
||||
resourceUnpacker.BeginDownload();
|
||||
yield return resourceUnpacker;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, resourceUnpacker.Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* 资源代码流程
|
||||
* 内置文件解压(解压器触发)
|
||||
BundleInfo::CreateDownloader()
|
||||
{
|
||||
return _buildFileSystem.DownloadFileAsync(Bundle, options);
|
||||
}
|
||||
BuildinFileSystem::DownloadFileAsync()
|
||||
{
|
||||
options.ImportFilePath = GetBuildinFileLoadPath(bundle);
|
||||
return _unpackFileSystem.DownloadFileAsync(bundle, options);
|
||||
}
|
||||
UnpackFileSystem::DownloadFileAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath) == false)
|
||||
{
|
||||
string mainURL = ConvertToWWWPath(options.ImportFilePath);
|
||||
options.SetURL(mainURL, mainURL);
|
||||
var downloader = new DownloadPackageBundleOperation(bundle, options);
|
||||
return downloader;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e56d0784f1af504c821e67a5ba81862
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestGetAssetInfos
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 获取所有资源对象信息
|
||||
var allAssetInfos = package.GetAllAssetInfos();
|
||||
Assert.AreEqual(allAssetInfos.Length, 28);
|
||||
|
||||
// 获取指定资源对象信息
|
||||
var assetInfos = package.GetAssetInfos("import");
|
||||
Assert.AreEqual(assetInfos.Length, 2);
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed2ce0f1d01df854da3622e757694128
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 967f41aa15e95ec4ebf41cbac0f0aafb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class T3_TestCacheFileSystem : IPrebuildSetup, IPostBuildCleanup
|
||||
{
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator A_InitializePackage()
|
||||
{
|
||||
// 清空旧的缓存目录
|
||||
string projectPath = Path.GetDirectoryName(Application.dataPath);
|
||||
string cacheRoot = $"{projectPath}/yoo";
|
||||
Directory.Delete(cacheRoot, true);
|
||||
|
||||
// 拷贝打包资源到本地服务器
|
||||
{
|
||||
string packageRoot = string.Empty;
|
||||
#if UNITY_EDITOR
|
||||
packageRoot = UnityEditor.EditorPrefs.GetString(T2_TestBuldinFileSystem.ASSET_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
#endif
|
||||
if (Directory.Exists(packageRoot) == false)
|
||||
throw new Exception($"Not found package root : {packageRoot}");
|
||||
|
||||
string testServerDirectory = "C://xampp/htdocs/CDN/Android/Test";
|
||||
CopyDirectory(packageRoot, testServerDirectory);
|
||||
}
|
||||
|
||||
// 初始化资源包 ASSET_BUNDLE
|
||||
{
|
||||
var package = YooAssets.CreatePackage(TestDefine.AssetBundlePackageName);
|
||||
|
||||
// 初始化资源包
|
||||
var initParams = new HostPlayModeParameters();
|
||||
var fileDecryption = new TestFileStreamDecryption();
|
||||
var manifestServices = new TestRestoreManifest();
|
||||
|
||||
string hostServerIP = "http://127.0.0.1/CDN/Android/Test/";
|
||||
var remoteServices = new TestRemoteServices(hostServerIP);
|
||||
initParams.BuildinFileSystemParameters = null;
|
||||
initParams.CacheFileSystemParameters = FileSystemParameters.CreateDefaultCacheFileSystemParameters(remoteServices, fileDecryption);
|
||||
initParams.CacheFileSystemParameters.AddParameter(FileSystemParametersDefine.MANIFEST_SERVICES, manifestServices);
|
||||
var initializeOp = package.InitializeAsync(initParams);
|
||||
yield return initializeOp;
|
||||
if (initializeOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(initializeOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, initializeOp.Status);
|
||||
|
||||
// 请求资源版本
|
||||
var requetVersionOp = package.RequestPackageVersionAsync();
|
||||
yield return requetVersionOp;
|
||||
if (requetVersionOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(requetVersionOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
// 更新资源清单
|
||||
var updateManifestOp = package.UpdatePackageManifestAsync(requetVersionOp.PackageVersion);
|
||||
yield return updateManifestOp;
|
||||
if (updateManifestOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(updateManifestOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, updateManifestOp.Status);
|
||||
}
|
||||
}
|
||||
private class TestRemoteServices : IRemoteServices
|
||||
{
|
||||
private readonly string _localServerRoot;
|
||||
|
||||
public TestRemoteServices(string localServerRoot)
|
||||
{
|
||||
_localServerRoot = localServerRoot;
|
||||
}
|
||||
string IRemoteServices.GetRemoteMainURL(string fileName)
|
||||
{
|
||||
return $"{_localServerRoot}/{fileName}";
|
||||
}
|
||||
string IRemoteServices.GetRemoteFallbackURL(string fileName)
|
||||
{
|
||||
return $"{_localServerRoot}/{fileName}";
|
||||
}
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C1_TestBundlePlaying()
|
||||
{
|
||||
var tester = new TestBundlePlaying();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C2_TestBundleImporter()
|
||||
{
|
||||
var tester = new TestBundleImporter();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator C3_TestBundleDownloader()
|
||||
{
|
||||
var tester = new TestBundleDownloader();
|
||||
yield return tester.RuntimeTester();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator D_DestroyPackage()
|
||||
{
|
||||
var tester = new TestDestroyPackage();
|
||||
yield return tester.RuntimeTester(false);
|
||||
}
|
||||
|
||||
private static void CopyDirectory(string sourceDir, string targetDir)
|
||||
{
|
||||
// 检查源目录是否存在
|
||||
if (!Directory.Exists(sourceDir))
|
||||
{
|
||||
throw new DirectoryNotFoundException($"源目录不存在: {sourceDir}");
|
||||
}
|
||||
|
||||
// 创建目标目录(如果不存在)
|
||||
Directory.CreateDirectory(targetDir);
|
||||
|
||||
// 拷贝所有文件
|
||||
foreach (string file in Directory.GetFiles(sourceDir))
|
||||
{
|
||||
string fileName = Path.GetFileName(file);
|
||||
string destFile = Path.Combine(targetDir, fileName);
|
||||
File.Copy(file, destFile, true); // true 表示覆盖已存在文件
|
||||
}
|
||||
|
||||
// 递归拷贝子目录
|
||||
foreach (string subDir in Directory.GetDirectories(sourceDir))
|
||||
{
|
||||
string dirName = Path.GetFileName(subDir);
|
||||
string newTargetDir = Path.Combine(targetDir, dirName);
|
||||
CopyDirectory(subDir, newTargetDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a680882da8a6755498514f4fd2210a34
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 测试远端文件下载
|
||||
/// </summary>
|
||||
public class TestBundleDownloader
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
var downloader = package.CreateResourceDownloader(10, 1);
|
||||
Assert.AreNotEqual(downloader.TotalDownloadCount, 0);
|
||||
|
||||
downloader.BeginDownload();
|
||||
yield return downloader;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, downloader.Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* 资源代码流程
|
||||
* 远端文件下载(下载器触发)
|
||||
BundleInfo::CreateDownloader()
|
||||
{
|
||||
return _buildFileSystem.DownloadFileAsync(Bundle, options);
|
||||
}
|
||||
CacheFileSystem::DownloadFileAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath))
|
||||
{
|
||||
//RemoteServices返回CDN文件路径
|
||||
string mainURL = RemoteServices.GetRemoteMainURL(bundle.FileName);
|
||||
string fallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName);
|
||||
options.SetURL(mainURL, fallbackURL);
|
||||
var downloader = new DownloadPackageBundleOperation(bundle, options);
|
||||
return downloader;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d1ca2e6dac603a459531fb09e61fd31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 测试本地文件导入
|
||||
/// </summary>
|
||||
public class TestBundleImporter
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
string packageRoot = UnityEditor.EditorPrefs.GetString(T2_TestBuldinFileSystem.ASSET_BUNDLE_PACKAGE_ROOT_KEY);
|
||||
DirectoryInfo packageDir = new DirectoryInfo(packageRoot);
|
||||
string fileRoot = $"{packageDir.Parent.FullName}/OutputCache";
|
||||
|
||||
ImportFileInfo fileInfoA = new ImportFileInfo();
|
||||
fileInfoA.FilePath = $"{fileRoot}/assets_samples_test_sample_testres3_import_prefab_importa.bundle.encrypt";
|
||||
fileInfoA.BundleName = "assets_samples_test_sample_testres3_import_prefab_importa.bundle";
|
||||
|
||||
ImportFileInfo fileInfoB = new ImportFileInfo();
|
||||
fileInfoB.FilePath = $"{fileRoot}/assets_samples_test_sample_testres3_import_prefab_importb.bundle.encrypt";
|
||||
fileInfoB.BundleName = "assets_samples_test_sample_testres3_import_prefab_importb.bundle";
|
||||
|
||||
ImportFileInfo[] importInfos = { fileInfoA, fileInfoB };
|
||||
var unpacker = package.CreateResourceImporter(importInfos, 10, 1);
|
||||
Assert.AreEqual(unpacker.TotalDownloadCount, 2);
|
||||
|
||||
unpacker.BeginDownload();
|
||||
yield return unpacker;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, unpacker.Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* 资源代码流程
|
||||
* 本地文件导入(导入器触发)
|
||||
BundleInfo::CreateDownloader()
|
||||
{
|
||||
options.ImportFilePath = _importFilePath;
|
||||
return _cacheFileSystem.DownloadFileAsync(Bundle, options);
|
||||
}
|
||||
CacheFileSystem::DownloadFileAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath) == false)
|
||||
{
|
||||
string mainURL = ConvertToWWWPath(options.ImportFilePath);
|
||||
options.SetURL(mainURL, mainURL);
|
||||
var downloader = new DownloadPackageBundleOperation(bundle, options);
|
||||
return downloader;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84a2bd73c962d0a4c9c3373ee8cd5380
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
/// 测试边玩边下
|
||||
/// </summary>
|
||||
public class TestBundlePlaying
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
if (package.IsNeedDownloadFromRemote("prefab_encryptA") == false)
|
||||
{
|
||||
Assert.Fail("Load bundle is already existed !");
|
||||
}
|
||||
if (package.IsNeedDownloadFromRemote("prefab_encryptB") == false)
|
||||
{
|
||||
Assert.Fail("Load bundle is already existed !");
|
||||
}
|
||||
|
||||
// 测试异步加载远端资源
|
||||
{
|
||||
var assetsHandle = package.LoadAssetAsync<GameObject>("prefab_encryptA");
|
||||
yield return assetsHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetsHandle.Status);
|
||||
}
|
||||
|
||||
// 测试同步加载远端资源
|
||||
{
|
||||
// 验证失败结果
|
||||
UnityEngine.TestTools.LogAssert.ignoreFailingMessages = true;
|
||||
var assetsHandle = package.LoadAssetSync<GameObject>("prefab_encryptB");
|
||||
Assert.AreEqual(EOperationStatus.Failed, assetsHandle.Status);
|
||||
UnityEngine.TestTools.LogAssert.ignoreFailingMessages = false;
|
||||
|
||||
// 清理加载器
|
||||
assetsHandle.Release();
|
||||
package.UnloadUnusedAssetsAsync();
|
||||
|
||||
// 验证成功结果
|
||||
// 说明:同步加载也会触发远端下载任务!
|
||||
yield return new WaitForSeconds(1f);
|
||||
assetsHandle = package.LoadAssetSync<GameObject>("prefab_encryptB");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetsHandle.Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 资源代码流程
|
||||
* 远端文件下载(加载器触发)
|
||||
CacheFileSystem::LoadBundleFile()
|
||||
{
|
||||
_cacheFileSystem.LoadBundleFile(bundle);
|
||||
}
|
||||
DCFSLoadAssetBundleOperation::InternalUpdate()
|
||||
{
|
||||
if (_steps == ESteps.DownloadFile)
|
||||
{
|
||||
DownloadFileOptions options = new DownloadFileOptions(int.MaxValue);
|
||||
_cacheFileSystem.DownloadFileAsync(_bundle, options);
|
||||
}
|
||||
}
|
||||
CacheFileSystem::DownloadFileAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(options.ImportFilePath))
|
||||
{
|
||||
//RemoteServices返回CDN文件路径
|
||||
string mainURL = RemoteServices.GetRemoteMainURL(bundle.FileName);
|
||||
string fallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName);
|
||||
options.SetURL(mainURL, fallbackURL);
|
||||
var downloader = new DownloadPackageBundleOperation(bundle, options);
|
||||
return downloader;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6db248f26f2eaaa4282a7bbdf709c321
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
public class TestDefine
|
||||
{
|
||||
public const string AssetBundlePackageName = "AssetBundleTestPackage";
|
||||
public const string RawBundlePackageName = "RawBundleTestPackage";
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b69d1ce3e025474e84dd43b10068740
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fcd7851bb8b7d34eb3684c8dbdd99f0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestDestroyPackage
|
||||
{
|
||||
public IEnumerator RuntimeTester(bool destroyRawPackage)
|
||||
{
|
||||
// 销毁旧资源包 ASSET_BUNDLE
|
||||
{
|
||||
var package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
var destroyOp = package.DestroyAsync();
|
||||
yield return destroyOp;
|
||||
if (destroyOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(destroyOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, destroyOp.Status);
|
||||
|
||||
bool result = YooAssets.RemovePackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
|
||||
// 销毁旧资源包 RAW_BUNDLE
|
||||
if (destroyRawPackage)
|
||||
{
|
||||
var package = YooAssets.GetPackage(TestDefine.RawBundlePackageName);
|
||||
var destroyOp = package.DestroyAsync();
|
||||
yield return destroyOp;
|
||||
if (destroyOp.Status != EOperationStatus.Succeed)
|
||||
Debug.LogError(destroyOp.Error);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, destroyOp.Status);
|
||||
|
||||
bool result = YooAssets.RemovePackage(TestDefine.RawBundlePackageName);
|
||||
Assert.IsTrue(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2772d71ea8e24f844b0ad661a3c85ee6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadAllAssets
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载所有资源
|
||||
{
|
||||
var allAssetsHandle = package.LoadAllAssetsAsync<GameObject>("prefab_a");
|
||||
yield return allAssetsHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, allAssetsHandle.Status);
|
||||
|
||||
var allAssetObjects = allAssetsHandle.AllAssetObjects;
|
||||
Assert.IsNotNull(allAssetObjects);
|
||||
|
||||
int count = allAssetObjects.Count;
|
||||
Assert.AreEqual(count, 3);
|
||||
}
|
||||
|
||||
// 同步加载所有资源
|
||||
{
|
||||
var allAssetsHandle = package.LoadAllAssetsSync<GameObject>("prefab_x");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, allAssetsHandle.Status);
|
||||
|
||||
var allAssetObjects = allAssetsHandle.AllAssetObjects;
|
||||
Assert.IsNotNull(allAssetObjects);
|
||||
|
||||
int count = allAssetObjects.Count;
|
||||
Assert.AreEqual(count, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 270615370ad21dc499a435e9bbc09269
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadAsset
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载音乐
|
||||
{
|
||||
var assetHandle = package.LoadAssetAsync<AudioClip>("music_a");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var audioClip = assetHandle.AssetObject as AudioClip;
|
||||
Assert.IsNotNull(audioClip);
|
||||
}
|
||||
|
||||
// 异步加载音效
|
||||
{
|
||||
var assetHandle = package.LoadAssetAsync<AudioClip>("sound_a");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var audioClip = assetHandle.AssetObject as AudioClip;
|
||||
Assert.IsNotNull(audioClip);
|
||||
}
|
||||
|
||||
// 同步加载音效
|
||||
{
|
||||
var assetHandle = package.LoadAssetSync<AudioClip>("sound_b");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var audioClip = assetHandle.AssetObject as AudioClip;
|
||||
Assert.IsNotNull(audioClip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4add568c6b99dd439ae31ab4953d0a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestAsyncTask
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// Task异步加载面板
|
||||
{
|
||||
var assetsHandle = package.LoadAssetAsync<GameObject>("canvas");
|
||||
var handleTask = assetsHandle.Task;
|
||||
while (!handleTask.IsCompleted)
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetsHandle.Status);
|
||||
|
||||
var instantiateOp = assetsHandle.InstantiateAsync();
|
||||
var operationTask = instantiateOp.Task;
|
||||
while (!operationTask.IsCompleted)
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, instantiateOp.Status);
|
||||
|
||||
Assert.IsNotNull(instantiateOp.Result);
|
||||
TestLogger.Log(this, instantiateOp.Result.name);
|
||||
GameObject.Destroy(instantiateOp.Result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3260bac2b14f0e949a2555a073cfb9fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadRawFile
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.RawBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 测试异步加载
|
||||
{
|
||||
var rawFileHandle = package.LoadRawFileAsync("raw_file_a");
|
||||
yield return rawFileHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, rawFileHandle.Status);
|
||||
|
||||
var filePath = rawFileHandle.GetRawFilePath();
|
||||
Assert.IsNotNull(filePath);
|
||||
|
||||
var fileText = rawFileHandle.GetRawFileText();
|
||||
TestLogger.Log(this, fileText);
|
||||
Assert.IsNotNull(fileText);
|
||||
|
||||
var fileData = rawFileHandle.GetRawFileData();
|
||||
Assert.IsNotNull(fileData);
|
||||
}
|
||||
|
||||
// 测试同步加载
|
||||
{
|
||||
var rawFileHandle = package.LoadRawFileSync("raw_file_b");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, rawFileHandle.Status);
|
||||
|
||||
var filePath = rawFileHandle.GetRawFilePath();
|
||||
Assert.IsNotNull(filePath);
|
||||
|
||||
var fileText = rawFileHandle.GetRawFileText();
|
||||
TestLogger.Log(this, fileText);
|
||||
Assert.IsNotNull(fileText);
|
||||
|
||||
var fileData = rawFileHandle.GetRawFileData();
|
||||
Assert.IsNotNull(fileData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24f8c082eecb6c042879f5913356e3b3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadScene
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载主场景
|
||||
{
|
||||
var sceneHandle = package.LoadSceneAsync("scene_a", LoadSceneMode.Single);
|
||||
yield return sceneHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, sceneHandle.Status);
|
||||
|
||||
var scene = sceneHandle.SceneObject;
|
||||
Assert.IsNotNull(scene);
|
||||
}
|
||||
|
||||
// 同步加载附加场景
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
{
|
||||
var sceneHandle = package.LoadSceneSync("scene_b", LoadSceneMode.Additive);
|
||||
Assert.AreEqual(EOperationStatus.Succeed, sceneHandle.Status);
|
||||
|
||||
var scene = sceneHandle.SceneObject;
|
||||
Assert.IsNotNull(scene);
|
||||
}
|
||||
|
||||
// 异步加载附加场景
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
SceneHandle cachedHandle;
|
||||
{
|
||||
cachedHandle = package.LoadSceneSync("scene_c", LoadSceneMode.Additive);
|
||||
yield return cachedHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, cachedHandle.Status);
|
||||
|
||||
var scene = cachedHandle.SceneObject;
|
||||
Assert.IsNotNull(scene);
|
||||
}
|
||||
|
||||
// 异步销毁附加场景
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
{
|
||||
var unloadSceneOp = cachedHandle.UnloadAsync();
|
||||
yield return unloadSceneOp;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, unloadSceneOp.Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d2de990b8132d043ac9e9b3c3cc881f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadScriptableObject
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载序列化对象
|
||||
{
|
||||
var assetHandle = package.LoadAssetAsync("config_a");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var testScriptableObject = assetHandle.AssetObject as TestScriptableObject;
|
||||
Assert.IsNotNull(testScriptableObject);
|
||||
TestLogger.Log(this, testScriptableObject.ConfigName);
|
||||
}
|
||||
|
||||
// 同步加载序列化对象
|
||||
{
|
||||
var assetHandle = package.LoadAssetSync("config_b");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var testScriptableObject = assetHandle.AssetObject as TestScriptableObject;
|
||||
Assert.IsNotNull(testScriptableObject);
|
||||
TestLogger.Log(this, testScriptableObject.ConfigName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 047c3635b9a26d7438f1cbb0c22cffaf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadSpriteAtlas
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
var assetHandle = package.LoadAssetAsync<SpriteAtlas>("atlas_icon");
|
||||
yield return assetHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, assetHandle.Status);
|
||||
|
||||
var spriteAtals = assetHandle.AssetObject as SpriteAtlas;
|
||||
Assert.IsNotNull(spriteAtals);
|
||||
|
||||
var sprite1 = spriteAtals.GetSprite("bullet");
|
||||
Assert.IsNotNull(sprite1);
|
||||
|
||||
var sprite2 = spriteAtals.GetSprite("pause");
|
||||
Assert.IsNotNull(sprite2);
|
||||
|
||||
var sprite3 = spriteAtals.GetSprite("rocket");
|
||||
Assert.IsNotNull(sprite3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: acd8842a73aab574584f1c9676f0b46f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
|
||||
public class TestLoadSubAssets
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.AssetBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
// 异步加载子对象
|
||||
{
|
||||
var subAssetsHandle = package.LoadSubAssetsAsync<Sprite>("image_a");
|
||||
yield return subAssetsHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, subAssetsHandle.Status);
|
||||
|
||||
var subAssetObjects = subAssetsHandle.SubAssetObjects;
|
||||
Assert.IsNotNull(subAssetObjects);
|
||||
|
||||
int count = subAssetObjects.Count;
|
||||
Assert.AreEqual(count, 3);
|
||||
}
|
||||
|
||||
// 同步加载子对象
|
||||
{
|
||||
var subAssetsHandle = package.LoadSubAssetsSync<Sprite>("image_b");
|
||||
Assert.AreEqual(EOperationStatus.Succeed, subAssetsHandle.Status);
|
||||
|
||||
var subAssetObjects = subAssetsHandle.SubAssetObjects;
|
||||
Assert.IsNotNull(subAssetObjects);
|
||||
|
||||
int count = subAssetObjects.Count;
|
||||
Assert.AreEqual(count, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6414488620921db45a18cb6f333addb2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.U2D;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using YooAsset;
|
||||
using UnityEngine.Video;
|
||||
|
||||
public class TestLoadVideo
|
||||
{
|
||||
public IEnumerator RuntimeTester()
|
||||
{
|
||||
ResourcePackage package = YooAssets.GetPackage(TestDefine.RawBundlePackageName);
|
||||
Assert.IsNotNull(package);
|
||||
|
||||
var rawFileHandle = package.LoadRawFileAsync("video_logo");
|
||||
yield return rawFileHandle;
|
||||
Assert.AreEqual(EOperationStatus.Succeed, rawFileHandle.Status);
|
||||
|
||||
// 获取视频文件地址
|
||||
string videoFilePath = rawFileHandle.GetRawFilePath();
|
||||
Assert.IsTrue(File.Exists(videoFilePath));
|
||||
|
||||
// 创建预制体播放视频
|
||||
GameObject go = new GameObject("video player");
|
||||
var videoPlayer = go.AddComponent<VideoPlayer>();
|
||||
videoPlayer.source = VideoSource.Url;
|
||||
videoPlayer.renderMode = VideoRenderMode.APIOnly;
|
||||
videoPlayer.url = videoFilePath;
|
||||
videoPlayer.Play();
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
Assert.IsTrue(videoPlayer.isPlaying);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ec434834a510eb4d823b786b2b83927
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using YooAsset;
|
||||
|
||||
// 自定义的配置文件
|
||||
public class TestScriptableObject : ScriptableObject
|
||||
{
|
||||
public string ConfigName = "yoo";
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11ddf12cbeb412347957744c69cfc3b6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
public static class TestLogger
|
||||
{
|
||||
public static void Log(System.Object instance, string message)
|
||||
{
|
||||
UnityEngine.Debug.Log($"[{instance.GetType().Name}] {message}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c956aea1eb6a9764abb5c9ada33a7bb3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "YooAsset.Test",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"YooAsset",
|
||||
"YooAsset.Editor",
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70c128f3a165dff44be2ed31f1431ddd
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/03.YooAsset/Samples~/Test Sample/TestRes.meta
Normal file
8
Assets/03.YooAsset/Samples~/Test Sample/TestRes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 548137b89f295524a9cf0e0a55f4dfa2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbce3e09a17b55c46b5615e995b5fc70
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 620a58d8d3f95f545a0859e7a3700c40
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 2
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 1
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
platformSettingOverrides:
|
||||
1:
|
||||
serializedVersion: 2
|
||||
loadType: 2
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 1
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
4:
|
||||
serializedVersion: 2
|
||||
loadType: 2
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 1
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
7:
|
||||
serializedVersion: 2
|
||||
loadType: 2
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 1
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
13:
|
||||
serializedVersion: 2
|
||||
loadType: 2
|
||||
sampleRateSetting: 2
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 7
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c579d502aac4ba845895732f136e06ba
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 1
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
platformSettingOverrides:
|
||||
1:
|
||||
serializedVersion: 2
|
||||
loadType: 1
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
4:
|
||||
serializedVersion: 2
|
||||
loadType: 1
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
7:
|
||||
serializedVersion: 2
|
||||
loadType: 1
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
13:
|
||||
serializedVersion: 2
|
||||
loadType: 1
|
||||
sampleRateSetting: 2
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 7
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd81c7a05b470df4190f45fd3291de7d
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
platformSettingOverrides:
|
||||
1:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
4:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
7:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 0
|
||||
compressionFormat: 0
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
13:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 2
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 7
|
||||
quality: 0.5
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4768b7c3d3101d4ea693f95b337861d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 347 KiB |
@@ -0,0 +1,219 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aabb33512ef5a1e4b82ab62b48174388
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: image_a_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 21
|
||||
y: 16
|
||||
width: 471
|
||||
height: 473
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 91146573e1a4d014a806b24fa9cb6f0d
|
||||
internalID: -1425660917
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: image_a_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 526
|
||||
y: 12
|
||||
width: 483
|
||||
height: 480
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: a1731b0da909b874186c63cdcaacdf44
|
||||
internalID: 1768656825
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: image_a_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1032
|
||||
y: 9
|
||||
width: 484
|
||||
height: 486
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 539d18f1e9de1d748adba679160d2560
|
||||
internalID: -1756424530
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 9548a159e49be6d46a487f932e9ced9a
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable:
|
||||
image_a_0: -1425660917
|
||||
image_a_1: 1768656825
|
||||
image_a_2: -1756424530
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 347 KiB |
@@ -0,0 +1,219 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 837b56496d5027c41a3214fcbfb6ae2f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: image_a_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 21
|
||||
y: 16
|
||||
width: 471
|
||||
height: 473
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 91146573e1a4d014a806b24fa9cb6f0d
|
||||
internalID: -1425660917
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: image_a_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 526
|
||||
y: 12
|
||||
width: 483
|
||||
height: 480
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: a1731b0da909b874186c63cdcaacdf44
|
||||
internalID: 1768656825
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: image_a_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1032
|
||||
y: 9
|
||||
width: 484
|
||||
height: 486
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 539d18f1e9de1d748adba679160d2560
|
||||
internalID: -1756424530
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 9548a159e49be6d46a487f932e9ced9a
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable:
|
||||
image_a_0: -1425660917
|
||||
image_a_1: 1768656825
|
||||
image_a_2: -1756424530
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e9a00d6e825d644b9be75155d88daa6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,70 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: -2226153785594138141}
|
||||
m_Layer: 0
|
||||
m_Name: canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!223 &-2226153785594138141
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 1
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbefb050721c78a4fb44853720eaa76c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8da7a00d90270b44898e9b165f86f005
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb1303d9729dc8d4fb0846570e02feeb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_a
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab a !
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9237033ade476d42959bf68436d0d37
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_b
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab b !
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53fb9a4b24288ec46ab3d690586c05c2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_c
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab c !
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5b32207fc20a546a10680e84845fb7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e81e396869b47f44bbf32f7970cfcba1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_x
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab x !
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d60a4c3149ab06b468e38b88612419d6
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_y
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab y !
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a195cd63c03b9874a9dfe44d900af0b1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6283027362666271047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2037322908504346998}
|
||||
- component: {fileID: 7980853937325680292}
|
||||
- component: {fileID: 8207247306684829080}
|
||||
m_Layer: 0
|
||||
m_Name: prefab_z
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2037322908504346998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7980853937325680292
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8207247306684829080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6283027362666271047}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: this is prefab z !
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user