blob: 34be37fd552fdd189cfcb56cb9e12521a8101de0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//-----------------------------------------------------------------------
// <copyright file="SyncVarAttributeDrawer.cs" company="Sirenix IVS">
// Copyright (c) Sirenix IVS. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
#if UNITY_EDITOR && !UNITY_2019_1_OR_NEWER
#pragma warning disable 0618
namespace Sirenix.OdinInspector.Editor.Drawers
{
using Sirenix.Utilities;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
/// <summary>
/// SyncVar attribute drawer.
/// </summary>
public class SyncVarAttributeDrawer : OdinAttributeDrawer<SyncVarAttribute>
{
/// <summary>
/// Draws the property.
/// </summary>
protected override void DrawPropertyLayout(GUIContent label)
{
GUILayout.BeginHorizontal();
{
GUILayout.BeginVertical();
{
this.CallNextDrawer(label);
}
GUILayout.EndVertical();
GUILayout.Label("SyncVar", EditorStyles.miniLabel, GUILayoutOptions.Width(52f));
}
GUILayout.EndHorizontal();
}
}
}
#endif // UNITY_EDITOR && !UNITY_2019_1_OR_NEWER
|