Esempio n. 1
0
        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;
        }
Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 5
0
 void OnDestroy()
 {
     GameThread.EverySecond -= CheckForDead;
     Instance = null;
 }
Esempio n. 6
0
 void Awake()
 {
     Instance = this;
     GameThread.EverySecond += CheckForDead;
 }