protected void OnEnable() { if (!CheckAllExteral()) { LogWithTimestamp.LogError("外部文件检查未通过!!!!!"); } }
/// <summary> /// API:重新检查外部文件 /// </summary> public virtual void ReCheck() { #if UNITY_EDITOR // This simply does "LogEntries.Clear()" the long way: //var logEntries = System.Type.GetType("UnityEditorInternal.LogEntries,UnityEditor.dll"); //var clearMethod = logEntries.GetMethod("Clear", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); //clearMethod.Invoke(null, null); //LogEntries.Clear(); //Debug.ClearDeveloperConsole(); if (!CheckAllExteral()) { LogWithTimestamp.LogError("外部文件检查未通过!!!!!"); } #endif }