protected void DispatchVLogEvent(Object obj, VLogType type, string message)
 {
     if (OnLogEvent != null)
     {
         OnLogEvent(new VLog()
         {
             vLogType      = type,
             validatorName = TypeName,
             message       = message,
             objectPath    = ObjectUtility.GetObjectPath(obj)
         });
     }
 }
示例#2
0
 protected VLog CreateVLog(Object obj,
                           VLogType type,
                           string message,
                           string scenePath  = "",
                           VLogSource source = VLogSource.Scene)
 {
     return(new VLog()
     {
         vLogType = type,
         source = source,
         validatorName = TypeName,
         message = message,
         objectPath = ObjectUtility.GetObjectPath(obj),
         scenePath = scenePath
     });
 }
示例#3
0
    private static void DoLog(string szMsg, VLogType emType)
    {
        switch (emType)
        {
        case VLogType.NORMAL:
            UnityEngine.Debug.Log(szMsg);
            break;

        case VLogType.WARNING:
            UnityEngine.Debug.LogWarning(szMsg);
            break;

        case VLogType.ERROR:
            UnityEngine.Debug.LogError(szMsg);
            break;
        }

        LogToFile("game.log", szMsg);
    }
示例#4
0
 protected void DispatchVLogEvent(Object obj,
                                  VLogType type,
                                  string message,
                                  string scenePath  = "",
                                  string objectPath = "")
 {
     if (OnLogEvent != null)
     {
         OnLogEvent(new VLog()
         {
             vLogType      = type,
             source        = VLogSource.Project,
             validatorName = TypeName,
             message       = message,
             objectPath    = string.IsNullOrEmpty(objectPath) ? ObjectUtility.GetObjectPath(obj) : objectPath,
             scenePath     = scenePath
         });
     }
 }
示例#5
0
 protected void DispatchVLogEvent(Object obj,
                                  VLogType type,
                                  string message,
                                  string scenePath  = "",
                                  VLogSource source = VLogSource.Scene)
 {
     if (OnLogEvent != null)
     {
         OnLogEvent(new VLog()
         {
             vLogType      = type,
             source        = source,
             validatorName = TypeName,
             message       = message,
             objectPath    = ObjectUtility.GetObjectPath(obj),
             scenePath     = scenePath
         });
     }
 }