Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.XR.ARFoundation;
- public class PlaneDetection : MonoBehaviour
- {
- public ARPlaneManager PlaneManager;
- public void Merge()
- {
- ARPlane maxArPlane = default;
- float maxSize = -1;
- foreach (var plane in PlaneManager.trackables)
- {
- var size = plane.size.x * plane.size.y;
- if (size > maxSize)
- {
- maxArPlane = plane;
- size = maxSize;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement