-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# MGS-Camera | ||
- [中文手册](./README_ZH.md) | ||
|
||
## Summary | ||
- Unity plugin for control camera in scene. | ||
|
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/************************************************************************* | ||
* Copyright © 2018 Mogoson. All rights reserved. | ||
*------------------------------------------------------------------------ | ||
* File : LogUtilitySettings.cs | ||
* Description : Settings of log utility. | ||
*------------------------------------------------------------------------ | ||
* Author : Mogoson | ||
* Version : 0.1.0 | ||
* Date : 9/19/2018 | ||
* Description : Initial development version. | ||
*************************************************************************/ | ||
|
||
using MGS.Common.Logger; | ||
using UnityEngine; | ||
|
||
namespace MGS.Logger | ||
{ | ||
/// <summary> | ||
/// Settings of log utility. | ||
/// </summary> | ||
static class LogUtilitySettings | ||
{ | ||
#region Field and Property | ||
#if !UNITY_EDITOR | ||
/// <summary> | ||
/// Path of log file. | ||
/// </summary> | ||
static readonly string LogPath = Application.persistentDataPath + "/Log/"; | ||
#endif | ||
#endregion | ||
|
||
#region Public Method | ||
/// <summary> | ||
/// Initialize log utility. | ||
/// </summary> | ||
[RuntimeInitializeOnLoadMethod] | ||
static void Initialize() | ||
{ | ||
#if UNITY_EDITOR | ||
LogUtility.Logger = UnityDebugger.Instance; | ||
#else | ||
FileLogger.Instance.LogPath = LogPath; | ||
LogUtility.Logger = FileLogger.Instance; | ||
#endif | ||
} | ||
#endregion | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/************************************************************************* | ||
* Copyright © 2018 Mogoson. All rights reserved. | ||
*------------------------------------------------------------------------ | ||
* File : UnityDebugger.cs | ||
* Description : Debugger for unity editor. | ||
*------------------------------------------------------------------------ | ||
* Author : Mogoson | ||
* Version : 0.1.0 | ||
* Date : 9/19/2018 | ||
* Description : Initial development version. | ||
*************************************************************************/ | ||
|
||
using MGS.Common.DesignPattern; | ||
using UnityEngine; | ||
|
||
namespace MGS.Logger | ||
{ | ||
/// <summary> | ||
/// Debugger for unity editor. | ||
/// </summary> | ||
public sealed class UnityDebugger : Singleton<UnityDebugger>, Common.Logger.ILogger | ||
{ | ||
#region Private Method | ||
/// <summary> | ||
/// Constructor. | ||
/// </summary> | ||
private UnityDebugger() { } | ||
#endregion | ||
|
||
#region Public Method | ||
/// <summary> | ||
/// Logs a formatted message. | ||
/// </summary> | ||
/// <param name="level">Level of log message.</param> | ||
/// <param name="format">A composite format string.</param> | ||
/// <param name="args">Format arguments.</param> | ||
public void Log(int level, string format, params object[] args) | ||
{ | ||
Debug.LogFormat(format, args); | ||
} | ||
|
||
/// <summary> | ||
/// Logs a formatted error message. | ||
/// </summary> | ||
/// <param name="level">Level of error message.</param> | ||
/// <param name="format">A composite format string.</param> | ||
/// <param name="args">Format arguments.</param> | ||
public void LogError(int level, string format, params object[] args) | ||
{ | ||
Debug.LogErrorFormat(format, args); | ||
} | ||
|
||
/// <summary> | ||
/// Logs a formatted warning message. | ||
/// </summary> | ||
/// <param name="level">Level of warning message.</param> | ||
/// <param name="format">A composite format string.</param> | ||
/// <param name="args">Format arguments.</param> | ||
public void LogWarning(int level, string format, params object[] args) | ||
{ | ||
Debug.LogWarningFormat(format, args); | ||
} | ||
#endregion | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.