diff --git a/Convention/[Art]/GridFull/Grid2DFull/Grid2DFull-XZ.mat b/Convention/[Art]/GridFull/Grid2DFull/Grid2DFull-XZ.mat index 5ced60b..6d9f944 100644 --- a/Convention/[Art]/GridFull/Grid2DFull/Grid2DFull-XZ.mat +++ b/Convention/[Art]/GridFull/Grid2DFull/Grid2DFull-XZ.mat @@ -141,7 +141,7 @@ Material: - _Anisotropy: 0 - _BlendMode: 0 - _CoatMask: 0 - - _ColorLevel: 1 + - _ColorLevel: 0.1 - _CullMode: 2 - _CullModeForward: 2 - _Cutoff: 0.5 diff --git a/Convention/[Runtime]/Camera/FreeSceneCamera.cs b/Convention/[Runtime]/Camera/FreeSceneCamera.cs index b81b24c..bebe96c 100644 --- a/Convention/[Runtime]/Camera/FreeSceneCamera.cs +++ b/Convention/[Runtime]/Camera/FreeSceneCamera.cs @@ -36,59 +36,67 @@ namespace Convention private void Update() { - Vector3 dxyz = Vector3.zero; - //Vector3 rxyz = Vector3.zero; - if (Keyboard.current[Key.W].isPressed || Keyboard.current[Key.UpArrow].isPressed) + if (isFocus) { - var temp = TargetFollow.forward; - //temp.y = 0; - dxyz += temp.normalized; - } - if (Keyboard.current[Key.A].isPressed || Keyboard.current[Key.LeftArrow].isPressed) - { - var temp = TargetFollow.right; - temp.y = 0; - dxyz -= temp.normalized; - } - if (Keyboard.current[Key.D].isPressed || Keyboard.current[Key.RightArrow].isPressed) - { - var temp = TargetFollow.right; - temp.y = 0; - dxyz += temp.normalized; - } - if (Keyboard.current[Key.S].isPressed || Keyboard.current[Key.DownArrow].isPressed) - { - var temp = TargetFollow.forward; - //temp.y = 0; - dxyz -= temp.normalized; - } - if (Keyboard.current[Key.Space].isPressed) - dxyz += Vector3.up; + Vector3 dxyz = Vector3.zero; + //Vector3 rxyz = Vector3.zero; + if (Keyboard.current[Key.W].isPressed || Keyboard.current[Key.UpArrow].isPressed) + { + var temp = TargetFollow.forward; + //temp.y = 0; + dxyz += temp.normalized; + } + if (Keyboard.current[Key.A].isPressed || Keyboard.current[Key.LeftArrow].isPressed) + { + var temp = TargetFollow.right; + temp.y = 0; + dxyz -= temp.normalized; + } + if (Keyboard.current[Key.D].isPressed || Keyboard.current[Key.RightArrow].isPressed) + { + var temp = TargetFollow.right; + temp.y = 0; + dxyz += temp.normalized; + } + if (Keyboard.current[Key.S].isPressed || Keyboard.current[Key.DownArrow].isPressed) + { + var temp = TargetFollow.forward; + //temp.y = 0; + dxyz -= temp.normalized; + } + if (Keyboard.current[Key.Space].isPressed) + dxyz += Vector3.up; #if !UNITY_EDITOR if (Keyboard.current[Key.LeftShift].isPressed) #else - if (Keyboard.current[Key.Q].isPressed) + if (Keyboard.current[Key.Q].isPressed) #endif - dxyz -= Vector3.up; + dxyz -= Vector3.up; - var drotation = Vector3.zero; - if (isFocus) - { - var temp = Mouse.current.delta.ReadValue(); - drotation = new(-temp.y, temp.x, 0); + var drotation = Vector3.zero; + { + var temp = Mouse.current.delta.ReadValue(); + drotation = new(-temp.y, temp.x, 0); + } + + // + + TargetFollow.Translate(dxyz * moveSpeed, Space.World); + TargetFollow.Rotate(drotation * rotationSpeed, Space.Self); + + // + + if (Keyboard.current[Key.Escape].isPressed) + isFocus = false; + if (Keyboard.current[Key.LeftCtrl].isPressed && Keyboard.current[Key.LeftShift].isPressed) + { + TargetFollow.localEulerAngles = new(0, TargetFollow.eulerAngles.y, 0); + if(Keyboard.current[Key.Z].wasPressedThisFrame) + { + TargetFollow.localPosition = Vector3.zero; + } + } } - - // - - TargetFollow.Translate(dxyz * moveSpeed, Space.World); - TargetFollow.Rotate(drotation * rotationSpeed, Space.Self); - - // - - if (Keyboard.current[Key.Escape].isPressed) - isFocus = false; - if (Keyboard.current[Key.LeftCtrl].isPressed && Keyboard.current[Key.LeftShift].isPressed) - TargetFollow.localEulerAngles = new(0, TargetFollow.eulerAngles.y, 0); } } } diff --git a/Convention/[Visual]/UIComponent/Variant/PropertiesWindow.cs b/Convention/[Visual]/UIComponent/Variant/PropertiesWindow.cs index 7cf18cb..3a7884f 100644 --- a/Convention/[Visual]/UIComponent/Variant/PropertiesWindow.cs +++ b/Convention/[Visual]/UIComponent/Variant/PropertiesWindow.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using Convention.Internal; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; @@ -288,11 +289,11 @@ namespace Convention.WindowsUI.Variant private void ForceRebuildLayoutImmediate() { // TODO - if(this.parentEntry!=null) { - + RectTransformExtension.AdjustSizeToContainsChilds(ref_value.transform as RectTransform); } return; + /* if (ref_value != null) { ConventionUtility.StartCoroutine(Adjuster(ref_value.transform as RectTransform)); @@ -330,6 +331,7 @@ namespace Convention.WindowsUI.Variant parentEntry.ForceRebuildLayoutImmediate(); yield break; } + */ } public void DisableChilds(bool isForceRebuildLayoutImmediate)