| | |
| | | |
| | | public bool CheckLocalFileValid(bool _completeFile) |
| | | { |
| | | #if UNITY_WEBGL |
| | | // WebGL无本地文件系统,资源由YooAsset WebPlayMode管理 |
| | | return true; |
| | | #else |
| | | if (_completeFile) |
| | | { |
| | | var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath); |
| | |
| | | } |
| | | |
| | | return true; |
| | | #endif |
| | | } |
| | | |
| | | // 检查外部存储文件是否存在 |
| | |
| | | { |
| | | string path = string.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath); |
| | | |
| | | #if UNITY_WEBGL |
| | | // WebGL无本地文件系统,直接走流式加载路径 |
| | | if (!m_RelativePath.Contains(".txt")) |
| | | { |
| | | if (otherAssetInfo == null || string.IsNullOrEmpty(otherAssetInfo.relativePath)) |
| | | return false; |
| | | |
| | | if (otherAssetInfo.size != size) |
| | | { |
| | | Debug.LogFormat("StreamingAssetPath 文件大小不对{0}-{1}", size, otherAssetInfo.size); |
| | | return false; |
| | | } |
| | | |
| | | if (otherAssetInfo.md5 != md5) |
| | | { |
| | | Debug.LogFormat("StreamingAssetPath 文件md5不对{0}-{1}", md5, otherAssetInfo.md5); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | return true; |
| | | #else |
| | | if (!File.Exists(path) && !m_RelativePath.Contains(".txt")) |
| | | { |
| | | //Debug.LogFormat("转查StreamingAssetPath - 文件不存在 {0} ", path); |
| | |
| | | } |
| | | |
| | | return CheckLocalFileValid(false); |
| | | |
| | | #endif |
| | | } |
| | | |
| | | |