forked from needle-mirror/com.unity.xr.management
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XRSupportedBuildTargetAttribute.cs
45 lines (37 loc) · 1.77 KB
/
XRSupportedBuildTargetAttribute.cs
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
using System;
#if UNITY_EDITOR
using UnityEditor;
namespace UnityEditor.XR.Management
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class XRSupportedBuildTargetAttribute : Attribute
{
/// <summary>
/// String representation of <see href="https://docs.unity3d.com/ScriptReference/BuildTargetGroup.html">UnityEditor.Build.BuildTargetGroup
/// </summary>
public BuildTargetGroup buildTargetGroup { get; set; }
/// <summary>
/// Array of BuildTargets, each of which is the representation of <see href="https://docs.unity3d.com/ScriptReference/BuildTarget.html">UnityEditor.Build.BuildTarget
/// aligned with <see cref="buildTargetGroup"/>.
///
/// Currently only advisory.
/// </summary>
public BuildTarget[] buildTargets { get; set; }
private XRSupportedBuildTargetAttribute() { }
/// <summary>Constructor for attribute. We assume that all build targets for this group will be supported.</summary>
/// <param name="buildTargetGroup">Build Target Group that will be supported.</param>
public XRSupportedBuildTargetAttribute(BuildTargetGroup buildTargetGroup)
{
this.buildTargetGroup = buildTargetGroup;
}
/// <summary>Constructor for attribute</summary>
/// <param name="buildTargetGroup">Build Target Group that will be supported.</param>
/// <param name="buildTargets">The set of build targets of Build Target Group that will be supported.</param>
public XRSupportedBuildTargetAttribute(BuildTargetGroup buildTargetGroup, BuildTarget[] buildTargets)
{
this.buildTargetGroup = buildTargetGroup;
this.buildTargets = buildTargets;
}
}
}
#endif