| | |
| | | using System.IO; |
| | | using UnityEditor; |
| | | |
| | | public class RunTimeABLoadLog |
| | | { |
| | | public class RunTimeABLoadLog
|
| | | {
|
| | | static List<string> assetBundleLoadLogs = new List<string>(); |
| | | |
| | | public static void AddLog(string _abName, string _asset, string _scene) |
| | | { |
| | | var log = StringUtility.Contact(_scene, "\t", _abName, "\t", _asset, "\t", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")); |
| | | assetBundleLoadLogs.Add(log); |
| | | public static void AddLog(string _abName, string _asset, string _scene)
|
| | | {
|
| | | var log = StringUtility.Contact(_scene, "\t", _abName, "\t", _asset, "\t", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
|
| | | assetBundleLoadLogs.Add(log);
|
| | | } |
| | | |
| | | [MenuItem("程序/打印资源包加载日志")] |
| | | public static void Print() |
| | | { |
| | | var tile = StringUtility.Contact("场景名", "\t", "资源包名", "\t", "资源名", "\t", "时间"); |
| | | assetBundleLoadLogs.Insert(0, tile); |
| | | File.WriteAllLines(Application.dataPath + "/RunTimeABLoadLog.txt", assetBundleLoadLogs.ToArray()); |
| | | } |
| | | |
| | | public static void Print()
|
| | | {
|
| | | var tile = StringUtility.Contact("场景名", "\t", "资源包名", "\t", "资源名", "\t", "时间");
|
| | | assetBundleLoadLogs.Insert(0, tile);
|
| | | File.WriteAllLines(Application.dataPath + "/RunTimeABLoadLog.txt", assetBundleLoadLogs.ToArray());
|
| | | }
|
| | |
|
| | | } |
| | | #endif |