Tanoda
Comment.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10#if UNITY_EDITOR
11using UnityEditor;
12#endif
13
14namespace Leap.Unity {
15
16 public class Comment : MonoBehaviour {
17
18 [TextArea]
19 [SerializeField]
20 protected string _comment;
21 public string text {
22 get { return _comment; }
23 set { _comment = value; }
24 }
25
26 [SerializeField, HideInInspector]
27 protected bool _isEditing = true;
28
29#if UNITY_EDITOR
30 [ContextMenu("Edit")]
31 private void beginEditing() {
32 Undo.RecordObject(this, "Enabled editing");
33 EditorUtility.SetDirty(this);
34 _isEditing = true;
35 }
36#endif
37
38 }
39}
string _comment
Definition: Comment.cs:20