Tanoda
LeapRuntimeTintData.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 System;
10using UnityEngine;
11
13
14 public partial class LeapGraphic {
15
22 public void SetRuntimeTint(Color color) {
23 getFeatureDataOrThrow<LeapRuntimeTintData>().color = color;
24 }
25
32 public void SetRuntimeTint(string htmlString) {
33 SetRuntimeTint(Utils.ParseHtmlColorString(htmlString));
34 }
35
43 return getFeatureDataOrThrow<LeapRuntimeTintData>().color;
44 }
45 }
46
47 [LeapGraphicTag("Runtime Tint")]
48 [Serializable]
50
51 [SerializeField]
52 private Color _color = Color.white;
53
59 public Color color {
60 get {
61 return _color;
62 }
63 set {
64 if (value != _color) {
66 _color = value;
67 }
68 }
69 }
70 }
71}
UnityEngine.Color Color
Definition: TestScript.cs:32
void SetRuntimeTint(string htmlString)
Overload of SetRuntimeTint that takes in a Html style string code that represents a color....
void SetRuntimeTint(Color color)
Helper method to set the runtime tint color for a runtime tint data object attached to this graphic....
Color GetRuntimeTint()
Helper method to get the runtime tint color for a runtime tint data object attached to this graphic....
Color color
The runtime tint color for this tint data object. This represents a multiplicative tint of the graphi...