2014년 7월 27일 일요일

SRemoteConsole-API설명

namespace SPlugins
{
 public static class SRemoteConsole
 {
   //커맨드 명령어를 처리할 콜백함수 입니다
   public static Action〈string> delegateOnReceiveCommand { get; set; }

   //시스템 메세지를 확인할수있는 콜백함수 입니다
   public static Action〈string> delegateOnReceiveSystemMessage { get; set; }

   //어플리케이션에서 보내는 로그정보를 확인할수있는 콜백 함수입니다
   public static Action〈LogData> delegateOnSendLog{ get; set; }

   //로그정보를 SRemoteConsoleEditor로 전송합니다 
   //context_ 정보 입력시 SRemoteConsoleEditor에서 오브젝트 이름을 확인 가능합니다
   public static void Log(string logMessage_, UnityEngine.Object context_ = null);
   public static void LogError(string logMessage_, UnityEngine.Object context_ = null);
   public static void LogWarning(string logMessage_, UnityEngine.Object context_ = null);

   //사용자 커맨드 명령어를 미리 등록합니다
   //SRemoteConsoleEditor에 등록되어 커맨드 검색으로 좀더 빠른 명령어 입력이 가능합니다
   public static void RegistCommand(string command_);

   //유니티에서 기본으로 제공하는 Debug 클래스의 로그정보를 SRemoteConsoleEditor에 출력합니다
   public static void RegisterUnityDebugLogCallback();
   public static void RegisterUnityDebugLogCallbackThreaded();
   
   //스택 정보의 프레임을 무시합니다
   //Log클래스를 Wrapper하여 사용할경우 유용합니다
   //SRemoteConsoleEditor 옵션에서도 셋팅 가능합니다
   public static void SkipStackFrameCount(int skipFrameCount_);

   //SRemoteConsole 이 Host로 실행될경우 사용합니다
   public static void StartClient(string hostIP_, int connectPort_ = 27889);

   //SRemoteConsole 이 Client로 실행될경우 사용합니다
   public static void StartHost(int connectPort_ = 27889, int maxConnection_ = 10);

   //네트워크를 사용하지않고 에디터에서 플레이할경우 사용합니다
   public static void StartLocal();

 }

 public class LogData 
 {
   //로그 타입
   public UnityEngine.LogType logType { get; set; }
   //로그 내용
   public string logContent { get; set; }
   //로그가 찍힐당시 스택정보
   public string logStackTrace { get; set; }
   //로그 생성위치
   public string filePath { get; set; }
   public Int32 lineNumber { get; set; }
   public Int32 columnNumber { get; set; }
   //로그 생성 시간
   public float timeS { get; set; }
   //로그 생성 프레임카운트
   public Int32 frameCount { get; set; }
   //로그가 UnityObject 타입일경우 오브젝트 이름
   public string objectName { get; set; }
 }
}/*namespace SPlugins*/

댓글 없음 :

댓글 쓰기