void Awake()
        {
            Transform.parent = null;

            flatSphere = ResourcePool.Rent <MeshMarkerResource>(Resource.Displays.Sphere, Transform);
            flatSphere.ShadowsEnabled = false;
            flatSphere.EmissiveColor  = Color.white;
            flatSphere.Layer          = LayerType.IgnoreRaycast;

            tooltip              = ResourcePool.RentDisplay <Tooltip>(Transform);
            tooltip.Layer        = LayerType.IgnoreRaycast;
            tooltip.UseAnimation = false;
        }
Beispiel #2
0
        void Start()
        {
            Color = Color.yellow;

            if (resource == null)
            {
                resource = ResourcePool.RentDisplay <LineResource>(Transform);
            }

            arCameraTransform = arCamera.transform;
            Transform.SetParentLocal(TfListener.OriginFrame.Transform);
            ARController.ARCameraViewChanged += OnARCameraViewChanged;
            gameObject.SetActive(!ARController.IsVisible);
        }
Beispiel #3
0
        void Awake()
        {
            node = FrameNode.Instantiate("Frame Highlighter");
            node.Transform.SetParentLocal(Transform);

            axisResource = ResourcePool.RentDisplay <AxisFrameResource>(node.Transform);
            axisResource.ShadowsEnabled = false;
            axisResource.Emissive       = 1;
            axisResource.OverrideMaterial(Resource.Materials.TransparentLitAlwaysVisible.Object);
            axisResource.Layer = LayerType.IgnoreRaycast;

            tooltip              = ResourcePool.RentDisplay <Tooltip>(node.Transform);
            tooltip.Layer        = LayerType.IgnoreRaycast;
            tooltip.UseAnimation = false;
        }
Beispiel #4
0
        void Awake()
        {
            mesh  = new Mesh();
            plane = GetComponent <ARPlane>();

            lines              = ResourcePool.RentDisplay <LineResource>();
            lines.Visible      = false;
            lines.ElementScale = 0.005f;
            lines.Tint         = Color.yellow;

            MeshFilter meshFilter = GetComponent <MeshFilter>();

            meshFilter.sharedMesh = mesh;

            meshCollider            = GetComponent <MeshCollider>();
            meshCollider.sharedMesh = mesh;

            meshRenderer = GetComponent <MeshRenderer>();

            //isEnabled = true;

            plane.boundaryChanged            += OnBoundaryChanged;
            ARController.ARCameraViewChanged += OnARCameraViewChanged;
        }