//focusWidth = GUILayout.MaxWidth(50f); void OnEnable() { //界面风格 style.fontStyle = FontStyle.Bold; style.normal.textColor = Color.white; _target = (VisualizeManager)target; _target.isActive = true; _target.btnRect.x = Screen.width - _target.btnRect.width; _target.btnRect.y = Screen.height - _target.btnRect.height; if (_target.isFirstAddPoint && _target.nodes.Count == 2) { _target.currentNum = 0; } else { _target.currentNum = _target.nodes.Count - 1; } //初始化 if (!_target.initialized) { _target.initialized = true; string timeStr = System.DateTime.Now.Year + "_" + System.DateTime.Now.Month + "_" + System.DateTime.Now.Day + "_" + System.DateTime.Now.Hour + "_" + System.DateTime.Now.Minute + "_" + System.DateTime.Now.Second; _target.pathName = "Path_" + timeStr; _target.nodes[0] = _target.transform.position; _target.nodes[1] = _target.transform.position + new Vector3(0.1f, 0.1f, 0.1f); _target.rotationList[0] = _target.rotationList[1] = _target.transform.eulerAngles; if (_target.camera != null) { _target.cameraViewList[0] = _target.cameraViewList[1] = _target.CameraView; } _target.isSliderLock = _target.isSlider; _target.currentNum = 0; } }
private void Start() { if (visualizeManager == null) { visualizeManager = GetComponentInParent <VisualizeManager>(); } }
//focusWidth = GUILayout.MaxWidth(50f); void OnEnable() { //界面风格 style.fontStyle = FontStyle.Bold; style.normal.textColor = Color.white; _target = (VisualizeManager)target; _target.isActive = true; _target.btnRect.x = Screen.width - _target.btnRect.width; _target.btnRect.y = Screen.height - _target.btnRect.height; if (_target.isFirstAddPoint && _target.nodes.Count == 2) _target.currentNum = 0; else _target.currentNum = _target.nodes.Count - 1; //初始化 if (!_target.initialized) { _target.initialized = true; string timeStr = System.DateTime.Now.Year + "_" + System.DateTime.Now.Month + "_" + System.DateTime.Now.Day + "_" + System.DateTime.Now.Hour + "_" + System.DateTime.Now.Minute + "_" + System.DateTime.Now.Second; _target.pathName = "Path_" + timeStr; _target.nodes[0] = _target.transform.position; _target.nodes[1] = _target.transform.position + new Vector3(0.1f, 0.1f, 0.1f); _target.rotationList[0] = _target.rotationList[1] = _target.transform.eulerAngles; if (_target.camera != null) { _target.cameraViewList[0] = _target.cameraViewList[1] = _target.CameraView; } _target.isSliderLock = _target.isSlider; _target.currentNum = 0; } }