美紀子ジェーン:
私はする必要がreset
/ restart
Arcoreのセッション。ARKitでは、私はちょうど新しい構成を作成し、実行しなければならないRunWithConfigAndOptions
方法を、私はArcoreの中でこれを行う方法上の任意の情報を見つけることができません。以下は、私がARKitのためにユニティに使用したコードです:
ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration();
config.planeDetection = UnityARPlaneDetection.Horizontal;
config.alignment = UnityARAlignment.UnityARAlignmentGravity;
config.enableLightEstimation = true;
UnityARSessionNativeInterface.GetARSessionNativeInterface().RunWithConfigAndOptions(config,
UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors |
UnityARSessionRunOption.ARSessionRunOptionResetTracking);
私はユニティで働いているが、私はすべての情報が有用であろうと思います。
感謝
アンディ:
試してみてくださいDestroyImmediate(session)
またはDestroy(session)
。そのうちの一つが動作する可能性があります。
ARCoreSession session = goARCoreDevice.GetComponent<ARCoreSession>();
ARCoreSessionConfig myConfig = session.SessionConfig;
DestroyImmediate(session);
// Destroy(session);
yield return null;
session = goARCoreDevice.AddComponent<ARCoreSession>();
session.SessionConfig = myConfig;
session.enabled = true;
お役に立てれば。