Compare commits

..

No commits in common. "441984fc5520219b12e4cb650ac47e6267decb74" and "1bc82f85807926b49f19a73573f68e792537f67e" have entirely different histories.

3 changed files with 18 additions and 32 deletions

View File

@ -7,44 +7,30 @@
****************************************************************************/
using System;
using System.Diagnostics;
namespace QFramework
{
public class ResSearchKeys : IPoolable, IPoolType
{
public class ResSearchKeys : IPoolable,IPoolType
{
public string AssetName { get; set; }
public string OwnerBundle { get; set; }
public string OwnerBundle { get; set; }
public Type AssetType { get; set; }
public string OriginalAssetName { get; set; }
public static ResSearchKeys Allocate(string assetName, string ownerBundleName = null, Type assetType = null)
{
var resSearchRule = SafeObjectPool<ResSearchKeys>.Instance.Allocate();
if (assetName.Contains("netimage:") ||
assetName.Contains("localimage:") ||
assetName.Contains("localaudio:") ||
assetName.Contains("localtext:") ||
assetName.Contains("localbytes:"))
{
// ÔÝʱÕâÑùдËÀ´¦Àí
resSearchRule.AssetName = assetName;
}
else
{
resSearchRule.AssetName = assetName.ToLower();
}
resSearchRule.AssetName = assetName.ToLower();
resSearchRule.OwnerBundle = ownerBundleName == null ? null : ownerBundleName.ToLower();
resSearchRule.AssetType = assetType;
resSearchRule.OriginalAssetName = assetName;
return resSearchRule;
}
public void Recycle2Cache()
{
SafeObjectPool<ResSearchKeys>.Instance.Recycle(this);
@ -65,10 +51,10 @@ namespace QFramework
{
isMatch = isMatch && res.OwnerBundleName == OwnerBundle;
}
return isMatch;
}
return false;
}

View File

@ -60,6 +60,7 @@ public class TimeLineAction : IAction
public void OnExecute(float dt)
{
Debug.LogError($"time:{play.time * fps} >= curEnd:{curEndFrame} ");
if (curEndFrame != -1 && play.time * fps >= curEndFrame)
{
play.time = curEndFrame / 24;
@ -68,6 +69,7 @@ public class TimeLineAction : IAction
}
if (play.state != PlayState.Playing)
{
Debug.LogError("Finished");
Finished();
}
}

View File

@ -18,7 +18,7 @@ public class VirtualFPostProcess : IPostprocessBuildWithReport
if (Directory.Exists(dataFolderPath))
{
// 目标目录强制小写
string targetDataPath = Path.Combine(buildOutputPath, "Data");
string targetDataPath = Path.Combine(buildOutputPath, "data");
CopyDirectoryWithLowerCaseNames(dataFolderPath, targetDataPath);
Debug.Log($"数据目录已复制到: {targetDataPath}");
}
@ -41,25 +41,23 @@ public class VirtualFPostProcess : IPostprocessBuildWithReport
private void CopyDirectoryWithLowerCaseNames(string sourceDir, string targetDir)
{
// 创建小写目标目录
//var lowerTargetDir = ConvertToLowerPath(targetDir);
Directory.CreateDirectory(targetDir);
var lowerTargetDir = ConvertToLowerPath(targetDir);
Directory.CreateDirectory(lowerTargetDir);
// 复制文件(带小写转换)
foreach (var file in Directory.GetFiles(sourceDir))
{
string fileName = Path.GetFileName(file);
// 暂时废弃小写转换
//string lowerName = ConvertToLowerPath(fileName);
File.Copy(file, Path.Combine(targetDir, fileName), true);
string lowerName = ConvertToLowerPath(fileName);
File.Copy(file, Path.Combine(lowerTargetDir, lowerName), true);
}
// 递归处理子目录(带小写转换)
foreach (var dir in Directory.GetDirectories(sourceDir))
{
string dirName = Path.GetFileName(dir);
// 暂时废弃小写转换
//string lowerDirName = ConvertToLowerPath(dirName);
CopyDirectoryWithLowerCaseNames(dir, Path.Combine(targetDir, dirName));
string lowerDirName = ConvertToLowerPath(dirName);
CopyDirectoryWithLowerCaseNames(dir, Path.Combine(lowerTargetDir, lowerDirName));
}
}