using System.Collections.Generic;
using UnityEditor;
using UnityEngine.XR.OpenXR.Features;
#if UNITY_EDITOR
using UnityEditor.XR.OpenXR.Features;
#endif
namespace UnityEngine.XR.OpenXR.Samples.MeshingFeature
{
///
/// Example extension showing how to supply a mesh from native code.
///
#if UNITY_EDITOR
[OpenXRFeature(UiName = "Sample: Meshing Teapot",
BuildTargetGroups = new[] {BuildTargetGroup.Standalone, BuildTargetGroup.WSA, BuildTargetGroup.Android},
Company = "Unity",
Desc = "Example feature extension showing how supply a mesh from native code.",
DocumentationLink = Constants.k_DocumentationURL,
OpenxrExtensionStrings = "",
Version = "0.0.1",
FeatureId = featureId)]
#endif
public class MeshingTeapotFeature : OpenXRFeature
{
///
/// The feature id string. This is used to give the feature a well known id for reference.
///
public const string featureId = "com.unity.openxr.feature.example.meshing";
private static List s_MeshDescriptors =
new List();
///
protected override void OnSubsystemCreate()
{
CreateSubsystem(s_MeshDescriptors, "Sample Meshing");
}
///
protected override void OnSubsystemStart()
{
StartSubsystem();
}
///
protected override void OnSubsystemStop()
{
StopSubsystem();
}
///
protected override void OnSubsystemDestroy()
{
DestroySubsystem();
}
}
}