fishnet installed
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FishNet.Managing.Client.Editing
|
||||
{
|
||||
|
||||
|
||||
[CustomEditor(typeof(ClientManager), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class ClientManagerEditor : Editor
|
||||
{
|
||||
private SerializedProperty _changeFrameRate;
|
||||
private SerializedProperty _frameRate;
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
_changeFrameRate = serializedObject.FindProperty("_changeFrameRate");
|
||||
_frameRate = serializedObject.FindProperty("_frameRate");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.ObjectField("Script:", MonoScript.FromMonoBehaviour((ClientManager)target), typeof(ClientManager), false);
|
||||
GUI.enabled = true;
|
||||
|
||||
|
||||
EditorGUILayout.PropertyField(_changeFrameRate);
|
||||
if (_changeFrameRate.boolValue)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_frameRate);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a652d51a1efa8a442966e885e2736599
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user