forked from TouchScript/TouchScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayDevice.cs
More file actions
46 lines (40 loc) · 1.08 KB
/
Copy pathDisplayDevice.cs
File metadata and controls
46 lines (40 loc) · 1.08 KB
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
43
44
45
46
/*
* @author Valentin Simonov / http://va.lent.in/
*/
using UnityEngine;
namespace TouchScript.Devices.Display
{
/// <summary>
/// A simple display device which inherits from <see cref="ScriptableObject"/> and can be saved in Unity assets.
/// </summary>
public class DisplayDevice : ScriptableObject, IDisplayDevice
{
/// <inheritdoc />
public string Name
{
get { return name; }
set
{
name = value;
base.name = value;
}
}
/// <inheritdoc />
public virtual float DPI
{
get { return dpi; }
set { dpi = value; }
}
/// <summary>Serialized device name.</summary>
[SerializeField]
protected new string name = "Unknown Device";
/// <summary>Serialized device DPI.</summary>
[SerializeField]
protected float dpi = 96;
/// <summary>OnEnable Unity method.</summary>
protected virtual void OnEnable()
{
base.name = name;
}
}
}