AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ToolTipBackground.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
UnityEngine
;
5
using
HoloToolkit
.
Unity
;
6
7
namespace
HoloToolkit
.UX.ToolTips
8
{
9
[RequireComponent(typeof(MeshFilter))]
10
16
public
abstract
class
ToolTipBackground
: MonoBehaviour
17
{
18
[SerializeField]
19
protected
ToolTip
toolTip
;
20
21
protected
virtual
void
OnEnable
()
22
{
23
toolTip = gameObject.EnsureComponent<
ToolTip
>();
24
25
if
(toolTip == null)
26
{
27
Debug
.LogError(
"No tooltip found in ToolTipMeshBackground"
);
28
enabled =
false
;
29
return
;
30
}
31
32
toolTip.
ContentChange
+= ContentChange;
33
}
34
35
protected
virtual
void
ContentChange
()
36
{
37
ScaleToFitContent();
38
}
39
40
protected
abstract
void
ScaleToFitContent();
41
}
42
}
HoloToolkit.UX.ToolTips.ToolTipBackground.OnEnable
virtual void OnEnable()
Definition:
ToolTipBackground.cs:21
HoloToolkit.UX.ToolTips.ToolTipBackground.toolTip
ToolTip toolTip
Definition:
ToolTipBackground.cs:19
HoloToolkit.UX.ToolTips.ToolTipBackground.ContentChange
virtual void ContentChange()
Definition:
ToolTipBackground.cs:35
HoloToolkit.UX.ToolTips.ToolTip
Class for Tooltip object Creates a floating tooltip that is attached to an object and moves to stay i...
Definition:
ToolTip.cs:18
Debug
HoloToolkit
HoloToolkit.UX.ToolTips.ToolTipBackground
Base class for a tool tip background Automatically finds a ToolTip and subscribes to ContentChange ac...
Definition:
ToolTipBackground.cs:16
HoloToolkit.UX.ToolTips.ToolTip.ContentChange
Action ContentChange
Used for Content Change update in text
Definition:
ToolTip.cs:405
UnityEngine
HoloToolkit.Unity
Assets
HoloToolkit
UX
Scripts
Tooltip
ToolTipBackground.cs
Generated by
1.8.12