[Add] FishNet
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#if UNITY_EDITOR
|
||||
using GameKit.Dependencies.Utilities;
|
||||
using UnityEditor;
|
||||
|
||||
namespace FishNet.Managing.Logging.Editing
|
||||
{
|
||||
[CustomEditor(typeof(LevelLoggingConfiguration), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class LevelLoggingConfigurationEditor : Editor
|
||||
{
|
||||
private SerializedProperty _isEnabled;
|
||||
private SerializedProperty _addLocalTick;
|
||||
private SerializedProperty _addTimestamps;
|
||||
private SerializedProperty _enableTimestampsInEditor;
|
||||
private SerializedProperty _developmentLogging;
|
||||
private SerializedProperty _guiLogging;
|
||||
private SerializedProperty _headlessLogging;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
_isEnabled = serializedObject.FindProperty(nameof(_isEnabled).MemberToPascalCase());
|
||||
|
||||
_addLocalTick = serializedObject.FindProperty(nameof(_addLocalTick));
|
||||
|
||||
_addTimestamps = serializedObject.FindProperty(nameof(_addTimestamps));
|
||||
_enableTimestampsInEditor = serializedObject.FindProperty(nameof(_enableTimestampsInEditor));
|
||||
|
||||
_developmentLogging = serializedObject.FindProperty(nameof(_developmentLogging));
|
||||
_guiLogging = serializedObject.FindProperty(nameof(_guiLogging));
|
||||
_headlessLogging = serializedObject.FindProperty(nameof(_headlessLogging));
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUILayout.PropertyField(_isEnabled);
|
||||
|
||||
if (_isEnabled.boolValue == false)
|
||||
return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
EditorGUILayout.PropertyField(_addLocalTick);
|
||||
|
||||
EditorGUILayout.PropertyField(_addTimestamps);
|
||||
if (_addTimestamps.boolValue == true)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_enableTimestampsInEditor);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_developmentLogging);
|
||||
EditorGUILayout.PropertyField(_guiLogging);
|
||||
EditorGUILayout.PropertyField(_headlessLogging);
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b815d3a75a4bcc54b907a07e83c7b7cb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 207815
|
||||
packageName: 'FishNet: Networking Evolved'
|
||||
packageVersion: 4.6.22R
|
||||
assetPath: Assets/FishNet/Runtime/Managing/Logging/Editor/LevelLoggingConfigurationEditor.cs
|
||||
uploadId: 866910
|
||||
Reference in New Issue
Block a user