Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by tonOnWu · Jan 17, 2018 at 02:00 AM · augmented-realityaugmented realityaugmentedrealityaugmented

How to stop plane detection using ARKit

Hi guys.

As I understand, plane detection is tough battery consumer process. Once I've got my plane and set the base object for the game, I wish to stop plane detection (or generating reference points). Does anybody knows a how to disable plane detection? and a how to enable it again?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by unity_27hrishik · Feb 18, 2018 at 04:02 PM

@tonymunoz One way to do that that is by re-running the UnityARSessionNativeInterface's RunWithConfig() with the new parameters, that belong's in UnityARCameraManager script. If you haven't altered the script the two function should do the work :

public void planeDetectionON() { planeDetection = UnityARPlaneDetection.Horizontal; ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration(); config.planeDetection = planeDetection; config.alignment = startAlignment; config.getPointCloudData = true; config.enableLightEstimation = true; m_session.RunWithConfig (config);

 }
 public void planeDetectionOFF()
 {
     planeDetection = UnityARPlaneDetection.None;
     ARKitWorldTrackingSessionConfiguration config = new ARKitWorldTrackingSessionConfiguration();
     config.planeDetection = planeDetection;
     config.alignment = startAlignment;
     config.getPointCloudData = false;
     config.enableLightEstimation = false;
     m_session.RunWithConfig (config);
 }

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image unity_27hrishik · Feb 18, 2018 at 04:04 PM 0
Share

by the way this worked for me. but i really don't know if this the real way to stop plane detection Hope it helps

avatar image tonOnWu · Feb 28, 2018 at 01:21 PM 0
Share

Hi.

This solution effectively stop the plane and anchors generation. Thank you very much. The problem now is that the ones that were available an instant before running planeDetectionOff() are still on. I wish to remove them too. I've been trying adding this code to planeDetectionOff, but it's not working:

         UnityARSessionRunOption options = new UnityARSessionRunOption();
         options = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking;
         m_session.RunWithConfigAndOptions(config, options);
avatar image unity_27hrishik tonOnWu · Feb 28, 2018 at 01:42 PM 0
Share

Lokking up the Arkit's Declearation the above code already exists RunWithConfig(). that is By Default the above code should run with those option but it's not running. Have no clue on how to stop it.

avatar image
0

Answer by tonOnWu · Jan 23, 2018 at 02:09 AM

Hi guys. I have several days on this topic and nothing. I don't know a way to stop plane detection.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image intropy · Jan 27, 2018 at 03:19 PM 0
Share

I have the same issue.

ref this question: https://forum.unity.com/threads/arkit-support-for-ios-via-unity-arkit-plugin.474385/page-18#post-3174684

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

133 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Vuforia on HoloLens 2 1 Answer

Is it possible to have an AR without image target or marker?,Is it possible to make an AR without a marker or target image? 1 Answer

ARFoundation ARPlaneManager not detecting walls 1 Answer

cloud anchor prefab!! 0 Answers

Unity and Vuforia app crashes on iOS after reloading scene with ARCamera 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges