#if UNITY_EDITOR using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using System.IO; using UnityEditor; public class RunTimeABLoadLog { static List assetBundleLoadLogs = new List(); 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()); } } #endif