mirror of
https://github.com/smyalygames/monopoly.git
synced 2025-05-19 06:44:10 +02:00
32 lines
945 B
C#
32 lines
945 B
C#
using Mirror.Logging;
|
|
using UnityEditor;
|
|
|
|
namespace Mirror.EditorScripts.Logging
|
|
{
|
|
[CustomEditor(typeof(NetworkLogSettings))]
|
|
public class NetworkLogSettingsEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
|
|
NetworkLogSettings target = this.target as NetworkLogSettings;
|
|
|
|
if (target.settings == null)
|
|
{
|
|
LogSettings newSettings = LogLevelsGUI.DrawCreateNewButton();
|
|
if (newSettings != null)
|
|
{
|
|
SerializedProperty settingsProp = serializedObject.FindProperty("settings");
|
|
settingsProp.objectReferenceValue = newSettings;
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
LogLevelsGUI.DrawLogFactoryDictionary(target.settings);
|
|
}
|
|
}
|
|
}
|
|
}
|