43 lines
1.8 KiB
C#
43 lines
1.8 KiB
C#
using System;
|
|
|
|
namespace UnityEditor.XR.Management
|
|
{
|
|
/// <summary>
|
|
/// Attribute to specify the supported build targets for a XR plugin.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
|
public sealed class XRSupportedBuildTargetAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// String representation of <a href="https://docs.unity3d.com/ScriptReference/BuildTargetGroup.html">UnityEditor.Build.BuildTargetGroup</a>
|
|
/// </summary>
|
|
public BuildTargetGroup buildTargetGroup { get; set; }
|
|
|
|
/// <summary>
|
|
/// Array of BuildTargets, each of which is the representation of <a href="https://docs.unity3d.com/ScriptReference/BuildTarget.html">UnityEditor.Build.BuildTarget</a>
|
|
/// 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;
|
|
}
|
|
}
|
|
}
|