当前提交
de763b1a
共有 6 个文件被更改,包括 1103 次插入 和 19 次删除
-
62Assets/Scripts/Game/GameManager.cs
-
40Assets/Scripts/Infrastructure/LogHandlerSettings.cs
-
11Assets/Scripts/Infrastructure/LogHandlerSettings.cs.meta
-
8Assets/StreamingAssets.meta
-
1001lobby-relay-sample.zip
|
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Events; |
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace LobbyRelaySample |
|||
{ |
|||
public class LogHandlerSettings : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
[Tooltip("Only logs of this level or higher will appear in the console.")] |
|||
private LogMode m_Mode = LogMode.Critical; |
|||
|
|||
void Awake() |
|||
{ |
|||
LogHandler.Get().mode = m_Mode; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
[System.Serializable] |
|||
public class LogFilter |
|||
{ |
|||
[SerializeField] |
|||
private LogType m_ifThisType; |
|||
public LogType IfThisType => m_ifThisType; |
|||
|
|||
public UnityEvent<string> m_logMessageCallback; |
|||
|
|||
public void Filter(LogType logType, string logString) |
|||
{ |
|||
if (logType != IfThisType) |
|||
return; |
|||
m_logMessageCallback?.Invoke(logString); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 089231d71bcfb8d479b4f8b778b1026f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 856fc4d990badc74a96656143dedb8e9 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
lobby-relay-sample.zip
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
撰写
预览
正在加载...
取消
保存
Reference in new issue