1. 2.不支持vulkan渲染–>减掉 3. 4.建议用unity2020不用2019,因为从unity提供和官网提供的版本不同,这个有要求 5.现在只有unityPro才能在电脑上测试 6.华为手机现在不能装Google play services…… 7.检测设备是否支持ARcore
using UnityEngine.XR.ARFoundation;
public class CheckDevice : MonoBehaviour
{
[SerializeField] ARSession m_Session;
void Awake()
{
m_Session = GetComponent<ARSession>();
}
private IEnumerator Start()
{
Debug.Log("Start");
if ((ARSession.state == ARSessionState.None)||(ARSession.state==ARSessionState.CheckingAvailability))
{
Debug.Log("Chack Availability");
yield return ARSession.CheckAvailability();
}
if (ARSession.state == ARSessionState.Unsupported)
{
Debug.LogWarning("Device Not Supported");
}
else {
Debug.Log("Device OK");
m_Session.enabled = true;
}
}
}
|