private void StartPick(int i)
        {
            if (onDeactivateGizmos != null)
            {
                onDeactivateGizmos.Invoke();
            }
            pickingVertexIndex = i;
            pickingVertex      = true;
            for (int j = 0; j < vertexInfos.Length; j++)
            {
                vertexInfos[j].coordsBforeEdit = vertexInfos[j].currentCoords;
                if (j != i)
                {
                    vertexInfos[j].DisableUIElements();
                }
            }

            if (!vertexPicker)
            {
                vertexPicker = Instantiate(vertexPickerPrefab).GetComponentInChildren <CapsuleRay>();
                vertexPicker.SetCamera(CVSPUIManager.GetEditorCamera());
            }
            vertexPicker.SetActive(true);
            vertexInfos[i].oldCoords = vertexInfos[i].currentCoords;
            selectedHighlight.SetActive(true);
            Vector3 pos = selectedHighlight.transform.position;

            StopAllCoroutines();
            StartCoroutine(CVSPUIUtils.UIMovementCoroutine(selectedHighlight, 0.15f, new Vector3(pos.x, vertexInfos[i].parentObject.position.y, pos.z)));
        }
示例#2
0
 internal void SetActive(bool b)
 {
     mouseRay.SetActive(b);
     vertexMarker.enabled = b;
     SetCamera(CVSPUIManager.GetEditorCamera());
 }