Tanoda
LeapSpriteData.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
9
using
System;
10
using
UnityEngine
;
11
using
UnityEngine
.Serialization;
12
using
Leap
.
Unity
.
Attributes
;
13
14
namespace
Leap.Unity.GraphicalRenderer
{
15
16
public
static
class
LeapSpriteFeatureExtension {
17
public
static
LeapSpriteData Sprite(
this
LeapGraphic graphic) {
18
return
graphic.GetFeatureData<LeapSpriteData>();
19
}
20
}
21
22
[LeapGraphicTag(
"Sprite"
)]
23
[Serializable]
24
public
class
LeapSpriteData
:
LeapFeatureData
{
25
26
[FormerlySerializedAs(
"sprite"
)]
27
[
EditTimeOnly
, SerializeField]
28
private
Sprite _sprite;
29
30
public
Sprite
sprite
{
31
get
{
32
return
_sprite;
33
}
34
set
{
35
_sprite = value;
36
graphic
.
isRepresentationDirty
=
true
;
37
MarkFeatureDirty
();
38
}
39
}
40
}
41
}
Leap.Unity.Attributes.EditTimeOnly
Definition:
EditTimeOnly.cs:15
Leap.Unity.GraphicalRenderer.LeapFeatureData
Definition:
LeapGraphicFeature.cs:97
Leap.Unity.GraphicalRenderer.LeapFeatureData.MarkFeatureDirty
void MarkFeatureDirty()
Definition:
LeapGraphicFeature.cs:104
Leap.Unity.GraphicalRenderer.LeapFeatureData.graphic
LeapGraphic graphic
Definition:
LeapGraphicFeature.cs:99
Leap.Unity.GraphicalRenderer.LeapGraphic.isRepresentationDirty
bool isRepresentationDirty
An internal flag that returns true if the visual representation of this graphic needs to be updated....
Definition:
LeapGraphic.cs:64
Leap.Unity.GraphicalRenderer.LeapSpriteData
Definition:
LeapSpriteData.cs:24
Leap.Unity.GraphicalRenderer.LeapSpriteData.sprite
Sprite sprite
Definition:
LeapSpriteData.cs:30
Leap.Unity.Attributes
Definition:
CombinablePropertyDrawer.cs:16
Leap.Unity.GraphicalRenderer
Definition:
EditorPickingMeshRebuilder.cs:12
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Legacy
GraphicRenderer
Scripts
Features
Sprite
LeapSpriteData.cs
Generated by
1.9.3