diff --git a/Assets/Plugins/XRLib/GenericController.meta b/Assets/Plugins/XRLib/GenericController.meta index b90e0752..c5293a96 100644 --- a/Assets/Plugins/XRLib/GenericController.meta +++ b/Assets/Plugins/XRLib/GenericController.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d10fcd63c1ede73469cd22e78a9cec4d +guid: 6451148b055de754fb30fc15d65fe211 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Plugins/XRLib/GenericController/Controller.prefab b/Assets/Plugins/XRLib/GenericController/Controller.prefab deleted file mode 100644 index f1cd8c7f..00000000 --- a/Assets/Plugins/XRLib/GenericController/Controller.prefab +++ /dev/null @@ -1,341 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2656137905910655519 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3640034311448942995} - - component: {fileID: 1502361923454310464} - - component: {fileID: 8226876023088850677} - m_Layer: 0 - m_Name: PRF_ControllerViewTarget - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3640034311448942995 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2656137905910655519} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -20, y: 27, z: -20} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 135340969371884068} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1502361923454310464 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2656137905910655519} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: eab1a07f8f5c6754a8f2a9789fb6b020, type: 3} - m_Name: - m_EditorClassIdentifier: - alwaysActive: 0 - active: 0 ---- !u!135 &8226876023088850677 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2656137905910655519} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.25 - m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &4602595839876627761 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7888456699290281049} - - component: {fileID: 1769739476192758786} - - component: {fileID: 2795261250788500754} - - component: {fileID: 6689677178373688372} - - component: {fileID: 6315610840044275566} - m_Layer: 10 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7888456699290281049 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4602595839876627761} - serializedVersion: 2 - m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535} - m_LocalPosition: {x: -45, y: 62.35534, z: -45} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 135340969371884068} - m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} ---- !u!20 &1769739476192758786 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4602595839876627761} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!114 &2795261250788500754 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4602595839876627761} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fafd8d68ae7258c4485adb2fffef3373, type: 3} - m_Name: - m_EditorClassIdentifier: - camera: {fileID: 0} - option: {fileID: 11400000, guid: 0443d35219f9d1646a57d550cc10e2b9, type: 2} - nextPosition: {x: 0, y: 0, z: 0} - saveTargetPositions: - datas: [] - maxValue: 0 - duration_MoveToCamera: 5 - speed_MoveToCamera: 1 - process: 0 - yUpPos: 0 - runSpeed: 0 - up: 119 - down: 115 - left: 97 - right: 100 - run: 304 - targetVisualization: 306 - viewMode: 2 - targetColliderRadius: 0 ---- !u!136 &6689677178373688372 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4602595839876627761} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 1 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &6315610840044275566 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4602595839876627761} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_VolumeFrameworkUpdateModeOption: 2 - m_RenderPostProcessing: 0 - m_Antialiasing: 0 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_AllowHDROutput: 1 - m_UseScreenCoordOverride: 0 - m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} - m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_Version: 2 - m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 ---- !u!1 &8457166540169997683 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3282114688579573793} - - component: {fileID: 2097398073062650089} - m_Layer: 0 - m_Name: MaxRange - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3282114688579573793 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8457166540169997683} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 135340969371884068} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &2097398073062650089 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8457166540169997683} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 100, y: 40, z: 100} - m_Center: {x: 0, y: 15, z: 0} ---- !u!1 &9065749286782967344 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 135340969371884068} - m_Layer: 0 - m_Name: Controller - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &135340969371884068 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9065749286782967344} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 3640034311448942995} - - {fileID: 3282114688579573793} - - {fileID: 7888456699290281049} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/XRLib/GenericController/Controller.prefab.meta b/Assets/Plugins/XRLib/GenericController/Controller.prefab.meta deleted file mode 100644 index 6ce80887..00000000 --- a/Assets/Plugins/XRLib/GenericController/Controller.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e8aa14877be9b924882fcad9d88abe46 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/GenericController.cs b/Assets/Plugins/XRLib/GenericController/GenericController.cs deleted file mode 100644 index edc375ae..00000000 --- a/Assets/Plugins/XRLib/GenericController/GenericController.cs +++ /dev/null @@ -1,131 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace WI -{ - public enum ViewMode - { - None, - TopView, - PerspectiveView, - FirstPersonView, - } - //TODO::Eat Viewmode - [RequireComponent(typeof(Camera))] - public abstract class GenericController : MonoBehaviour - { - public new Camera camera; - public GenericControllerOption option; - public MaxRangeLimitter maxRangeLimitter = new(); - protected Vector3 moveVector; - protected Vector3 cameraPosition; - public Vector3 nextPosition; - - public override void AfterAwake() - { - camera = GetComponent(); - option.Apply(this); - Collider MaxRange = transform.parent.Find(nameof(MaxRange)).GetComponent(); - maxRangeLimitter.SetRange(MaxRange); - } - - public virtual void Movement() - { - Move(); - Zoom(); - Rotate(); - } - protected abstract void Move(); - protected abstract void Zoom(); - protected abstract void Rotate(); - public abstract void LastPositioning(bool limit); - public abstract void Rewind(); - - protected UserInput input; - - public bool IsClickUI - { - get - { - bool result = false; - if (Input.GetMouseButtonDown(0)) - { - result = EventSystem.current.IsPointerOverGameObject(); - } - - return result; - } - } - - public bool IsOnTheUI - { - get - { - if (IsPointerOverExcludedUI()) - { - return false; - } - else - { - var result = EventSystem.current.IsPointerOverGameObject(); - return result; - } - } - } - bool IsPointerOverExcludedUI() - { - PointerEventData pointerData = new PointerEventData(EventSystem.current); - pointerData.position = Input.mousePosition; - - List raycastResults = new List(); - EventSystem.current.RaycastAll(pointerData, raycastResults); - - if (raycastResults.Count > 0) - { - if ((LayerMask.GetMask("Default") & (1 << raycastResults[0].gameObject.layer)) != 0) - { - return true; - } - } - - return false; - } - bool isPressed; - protected virtual void LateUpdate() - { - if (IsPressedUI()) - return; - - if (IsClickUI) - return; - - if (IsOnTheUI) - return; - - - input.GetInput(); - Movement(); - var limitCheck = maxRangeLimitter.MoveRangeLimit(nextPosition); - LastPositioning(limitCheck); - } - private bool IsPressedUI() - { - if (Input.GetMouseButtonDown(0)) - { - if (EventSystem.current.IsPointerOverGameObject()) - { - isPressed = true; - } - } - - if (Input.GetMouseButtonUp(0)) - { - isPressed = false; - } - return isPressed; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/XRLib/GenericController/GenericController.cs.meta b/Assets/Plugins/XRLib/GenericController/GenericController.cs.meta deleted file mode 100644 index c6c543b4..00000000 --- a/Assets/Plugins/XRLib/GenericController/GenericController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ffea721820281784f8195cdaac4c6c68 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs b/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs deleted file mode 100644 index 45ec3a0a..00000000 --- a/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using UnityEngine; - -namespace WI -{ - public abstract class GenericControllerOption : ScriptableObject, ISerializationCallbackReceiver - { - [SerializeField]bool _orthographic; - [SerializeField]float _moveSensivity; - [SerializeField]float _zoomSensivity; - [SerializeField]float _rotateSensivity; - [SerializeField]float _moveSpeed; - [SerializeField]float _zoomSpeed; - [SerializeField]float _rotateSpeed; - [SerializeField]float _fieldOfView; - [SerializeField]bool _moveLimit; - [SerializeField]bool _rotateLimit; - [SerializeField]bool _azimuthRotateLimit; - [SerializeField]bool _elevationRotateLimit; - [SerializeField] bool _isFirstPersonView; - - /**initialize Values*/ - [NonSerialized] - public bool orthographic; - [NonSerialized] - public float moveSensivity; - [NonSerialized] - public float zoomSensivity; - [NonSerialized] - public float rotateSensivity; - [NonSerialized] - public float moveSpeed; - [NonSerialized] - public float zoomSpeed; - [NonSerialized] - public float rotateSpeed; - [NonSerialized] - public float fieldOfView; - [NonSerialized] - public bool moveLimit; - [NonSerialized] - public bool rotateLimit; - [NonSerialized] - public bool azimuthRotateLimit; - [NonSerialized] - public bool elevationRotateLimit; - [NonSerialized] - public bool isFirstPersonView; - - public virtual void OnAfterDeserialize() - { - orthographic = _orthographic; - moveSensivity = _moveSensivity; - zoomSensivity = _zoomSensivity; - rotateSensivity = _rotateSensivity; - moveSpeed = _moveSpeed; - zoomSpeed = _zoomSpeed; - rotateSpeed = _rotateSpeed; - fieldOfView = _fieldOfView; - moveLimit = _moveLimit; - rotateLimit = _rotateLimit; - azimuthRotateLimit = _azimuthRotateLimit; - elevationRotateLimit = _elevationRotateLimit; - isFirstPersonView = _isFirstPersonView; - } - - public virtual void Apply(GenericController controller) - { - controller.camera.orthographic = orthographic; - controller.camera.fieldOfView = fieldOfView; - } - - public void OnBeforeSerialize() - { - //throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs.meta b/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs.meta deleted file mode 100644 index 11f29e11..00000000 --- a/Assets/Plugins/XRLib/GenericController/GenericControllerOption.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0f577bf79af2c134a872981610d2806d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs b/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs deleted file mode 100644 index 1d49ab60..00000000 --- a/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace WI -{ - public class MaxRangeLimitter - { - public Collider maxRange; - - public void SetRange(Collider maxrRangeCollider) - { - maxRange = maxrRangeCollider; - } - - public bool MoveRangeLimit(Vector3 pos) - { - if (maxRange == null) - return false; - - if (maxRange.bounds.Contains(pos)) - { - return true; - } - return false; - } - } -} diff --git a/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs.meta b/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs.meta deleted file mode 100644 index 55e05071..00000000 --- a/Assets/Plugins/XRLib/GenericController/MaxRangeLimitter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c74d6b8e9cbe1514f80fb2384ea51e38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset b/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset deleted file mode 100644 index ef9d3dd3..00000000 --- a/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0d55d555ae3a31a439ca5986c6199986, type: 3} - m_Name: OrbitalControllerOption - m_EditorClassIdentifier: - _orthographic: 0 - _moveSensivity: 0.5 - _zoomSensivity: 1 - _rotateSensivity: 10 - _moveSpeed: 2 - _zoomSpeed: 30 - _rotateSpeed: 5 - _fieldOfView: 60 - _moveLimit: 0 - _rotateLimit: 0 - _azimuthRotateLimit: 0 - _elevationRotateLimit: 0 - _isFirstPersonView: 0 - originElevation: 28.5 - currentElevation: 45 - elevationSensivity: 15 - minElevation: 5 - maxElevation: 90 - originAzimuth: 133 - currentAzimuth: 35 - azimuthSensivity: 15 - maxDistance: 60 - minDistance: 5 - moveClamper: 0.17225535 - originDistance: 40 - originTargetPos: {x: 9.714996, y: 57.3, z: 236.99342} - originTargetRot: {x: -0, y: 0, z: 0} - currentDistance: 10.335321 - target: {fileID: 0} diff --git a/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset.meta b/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset.meta deleted file mode 100644 index 43e2ddcc..00000000 --- a/Assets/Plugins/XRLib/GenericController/Options/OrbitalControllerOption.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0443d35219f9d1646a57d550cc10e2b9 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs b/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs deleted file mode 100644 index 92fb9286..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace WI -{ - [System.Serializable] - public class CameraEntity - { - public float x; - public float y; - public float z; - public float distance; - public float elevation; - public float azimuth; - public int floorIndex; - } -} - - diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs.meta b/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs.meta deleted file mode 100644 index 994656ea..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/CameraEntity.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: db7ea094b0ebba741893718f5fbfcbaa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalController.cs b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalController.cs index 98772b66..75e0d77d 100644 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalController.cs +++ b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -6,498 +6,233 @@ using UnityEngine.EventSystems; namespace WI { - //TODO::Something... Util Functions - public class OrbitalController : GenericController, ISingle, IOptionable + public enum ViewMode { - public new OrbitalControllerOption option => base.option as OrbitalControllerOption; - public SDictionary saveTargetPositions = new SDictionary(); - - public Action ZoomInOutEvent; - public int maxValue; - public float duration_MoveToCamera; - public float speed_MoveToCamera; - public float process; - public float yUpPos; - public float runSpeed; - float timer; - - [OptionSection] - string controllerOption; - [OptionKey] - string MoveSpeed="2"; - [OptionKey] - string ZoomSpeed = "30"; - [OptionKey] - string RotateSpeed ="5"; - [OptionKey] - string FORWARD="W"; - [OptionKey] - string BACKWARD="S"; - [OptionKey] - string LEFT="A"; - [OptionKey] - string RIGHT = "D"; - [OptionKey] - string RUN = "LeftShift"; - [OptionKey] - string TargetVisualization = "LeftControl"; - - public KeyCode up; - public KeyCode down; - public KeyCode left; - public KeyCode right; - public KeyCode run; - public KeyCode targetVisualization; + PerspectiveView, + TopView + } + public struct OrbitState + { + public float elevation; + public float distance; + public float azimuth; + public Vector3 pivotPosition; + } + //TODO::Something... Util Functions + public class OrbitalController : MonoBehaviour, ISingle + { public ViewMode viewMode; + private Vector3 originValue; + private Vector3 originTargetPos; + + private OrbitState perspectiveState; + private OrbitState orthoState; + + private new Camera camera; + + public float moveSpeed; + public float rotateSpeed; + public float zoomSpeed; + + public float maxElevation; + public float minElevation; + public float minDistance; + public float maxDistance; + public float currentElevation; + public float currentDistance; + public float currentAzimuth; + + private Vector3 cameraPosition; + private Vector3 nextPosition; + public OrbitalControllerTarget cameraPivot; + + private UserInput input; - public Action onPerspectiveView; - public Action onFirstPersonViewRay; public Action onChangeViewMode; - public float targetColliderRadius; - - public override void AfterAwake() + public void Awake() { - base.AfterAwake(); + camera = Camera.main; + cameraPivot = transform.GetComponentInChildren(); + } + void Start() + { + originValue.x = currentElevation; + originValue.y = currentDistance; + originValue.z = currentAzimuth; - targetColliderRadius = option.target.GetComponent().radius; + nextPosition = cameraPivot.transform.position; + originTargetPos = cameraPivot.transform.position; + + perspectiveState.elevation = originValue.x; + perspectiveState.distance = originValue.y; + perspectiveState.azimuth = originValue.z; + perspectiveState.pivotPosition = originTargetPos; + + orthoState.elevation = 90f; + orthoState.distance = originValue.y; + orthoState.azimuth = originValue.z; + orthoState.pivotPosition = originTargetPos; - foreach(ViewMode mode in Enum.GetValues(typeof(ViewMode))) - { - saveTargetPositions.Add(mode, null); - } SetViewMode(ViewMode.PerspectiveView); } - public override void AfterStart() + private void LateUpdate() { - SetControllOptionValue(); + input.GetInput(); + Movement(); } - public void SetControllOptionValue() + public void Movement() { - option.moveSpeed = float.Parse(MoveSpeed); - option.zoomSpeed = float.Parse(ZoomSpeed); - option.rotateSpeed = float.Parse(RotateSpeed); - runSpeed = option.moveSpeed * 1.5f; - - up = (KeyCode)Enum.Parse(typeof(KeyCode), FORWARD); - down = (KeyCode)Enum.Parse(typeof(KeyCode), BACKWARD); - left = (KeyCode)Enum.Parse(typeof(KeyCode), LEFT); - right = (KeyCode)Enum.Parse(typeof(KeyCode), RIGHT); - run = (KeyCode)Enum.Parse(typeof(KeyCode), RUN); - targetVisualization = (KeyCode)Enum.Parse(typeof(KeyCode), TargetVisualization); - } - - public override void Movement() - { - nextPosition = option.target.position; - Zoom(); Rotate(); Move(); - //FindLookAtObject(); + + LastPositioning(); } - protected override void Move() + private void Move() { - if (option.moveLimit) + if (!input.leftClick) { return; } - if (option.isFirstPersonView) - { - float keyboardX = 0; - float keyboardY = 0; + var delta = new Vector2(input.mouseX, input.mouseY); + var x = delta.x; + var y = delta.y * ((maxElevation - minElevation) / currentElevation); + var z = delta.y * ((minElevation - currentElevation) / maxElevation); - if (Input.GetKey(up)) - { - keyboardY = 1; - } - if (Input.GetKey(down)) - { - keyboardY = -1; - } - if (Input.GetKey(left)) - { - keyboardX = -1; - } - if (Input.GetKey(right)) - { - keyboardX = 1; - } + var moveVector = camera.transform.TransformDirection(x, y, -z); + moveVector.y = 0; - float moveSpeed; - if (Input.GetKey(run)) - { - moveSpeed = runSpeed * 2.5f; - } - else - { - moveSpeed = option.moveSpeed * 2.5f; - } - - moveVector = transform.TransformDirection(keyboardX, 0, keyboardY); - moveVector.y = 0; - - var t = option.currentDistance / option.maxDistance; - option.moveClamper = Mathf.Min(t, 1f); - - moveVector = moveVector.normalized * moveSpeed * Time.unscaledDeltaTime; - nextPosition = CalculateMovePosition(option.target.position, moveVector); - } - else - { - if (!input.leftClick) - { - return; - } - - moveVector = Vector3.zero; - - var mouseYsen = input.mouseY * option.elevationSensivity; - - float y = mouseYsen * ((option.maxElevation - option.minElevation) / option.currentElevation); - float z = mouseYsen * ((option.minElevation - option.currentElevation) / option.maxElevation); - - moveVector = transform.TransformDirection(input.mouseX * option.elevationSensivity, y, z); - moveVector.y = 0; - - var t = option.currentDistance / option.maxDistance; - option.moveClamper = Mathf.Min(t, 1f); - moveVector *= option.moveClamper * option.moveSpeed * option.moveSensivity; - nextPosition = option.target.position - moveVector; - } + moveVector *= moveSpeed * (currentDistance / maxDistance); + nextPosition = cameraPivot.transform.position - moveVector; } - Vector3 CalculateMovePosition(Vector3 origPos, Vector3 moveVec) + private void Zoom() { - if (moveVec == Vector3.zero) - return origPos; + var nextDistance = currentDistance - input.mouseWheel * zoomSpeed; + currentDistance = Mathf.Lerp(currentDistance, nextDistance, zoomSpeed * Time.deltaTime); + currentDistance = Mathf.Clamp(currentDistance, minDistance, maxDistance); - float moveDist = moveVec.magnitude; - Vector3 destPos = origPos + moveVec; - - int wallMask = LayerMask.GetMask("Floor Wall"); - - Collider[] hitColliders = Physics.OverlapSphere(destPos, targetColliderRadius, wallMask); - if (hitColliders.Length > 0) - { - RaycastHit[] raycastHits = Physics.SphereCastAll(origPos, targetColliderRadius, moveVec, moveDist + 0.11f, wallMask); - if (raycastHits.Length > 0) - { - foreach (RaycastHit hit in raycastHits) - { - moveVec -= hit.normal * Vector3.Dot(hit.normal, moveVec); - } - } - } - return origPos + moveVec; + camera.orthographicSize = currentDistance; } - protected override void Zoom() + protected void Rotate() { - if (option.isFirstPersonView) - return; - - camera.orthographicSize = camera.orthographic ? option.currentDistance : 0f; - - var nextDistance = option.currentDistance - input.mouseWheel * option.zoomSpeed; - option.currentDistance = Mathf.Lerp(option.currentDistance, nextDistance, option.zoomSpeed * Time.deltaTime); - option.currentDistance = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance); - - camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance); - var syncValue = -(maxValue * (option.currentDistance - option.maxDistance) / option.maxDistance); - ZoomInOutEvent?.Invoke(Mathf.RoundToInt(syncValue)); - } - - //TODO:: Into Member Methods... anywhere - public void SliderZoomInOut(int value) - { - camera.orthographicSize = camera.orthographic ? option.currentDistance : 0f; - - var nextDistance = option.maxDistance - (option.maxDistance / maxValue * value); - var lerpDistance = Mathf.Lerp(option.currentDistance, nextDistance, option.zoomSpeed * Time.deltaTime); - option.currentDistance = Mathf.Clamp(lerpDistance, option.minDistance, option.maxDistance); - camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance); - } - - protected override void Rotate() - { - if (option.rotateLimit) - return; - if (!input.rightClick) return; - if (option.isFirstPersonView) - { - option.currentAzimuth += input.mouseX * option.rotateSpeed; - option.currentAzimuth %= 360; + currentAzimuth += input.mouseX * rotateSpeed; + currentAzimuth %= 360; - option.currentElevation += input.mouseY * option.rotateSpeed; - option.currentElevation = Mathf.Clamp(option.currentElevation, -35f, 75f); + if(viewMode == ViewMode.PerspectiveView) + { + currentElevation -= input.mouseY * rotateSpeed; + currentElevation = Mathf.Clamp(currentElevation, minElevation, maxElevation); + } + } + + public void LastPositioning() + { + cameraPivot.transform.position = nextPosition; + var dist = new Vector3(0, 0, -currentDistance); + var distPos = Quaternion.Euler(currentElevation, currentAzimuth, 0f) * dist; + cameraPosition = nextPosition + distPos; + camera.transform.position = cameraPosition; + + if (currentElevation <= 90f) + { + camera.transform.rotation = Quaternion.Euler(currentElevation, currentAzimuth, 0f); } else { - AzimuthControl(); - ElevationControl(); - } - } - protected void AzimuthControl() - { - if (option.azimuthRotateLimit) - return; - - option.currentAzimuth += input.mouseX * option.rotateSpeed; - option.currentAzimuth %= 360; - } - - protected void ElevationControl() - { - if (option.orthographic) - return; - - if (option.elevationRotateLimit) - return; - - option.currentElevation -= input.mouseY * option.rotateSpeed; - option.currentElevation = Mathf.Clamp(option.currentElevation, option.minElevation, option.maxElevation); - } - - public override void LastPositioning(bool limit) - { - if (!limit) - return; - - if (option.isFirstPersonView) - { - option.target.position = nextPosition; - cameraPosition = nextPosition; - camera.transform.position = cameraPosition; - - transform.eulerAngles = new Vector3(-option.currentElevation, option.currentAzimuth, 0); - } - else - { - option.target.position = nextPosition; - var dist = new Vector3(0, 0, -option.currentDistance); - var distPos = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist; - cameraPosition = nextPosition + distPos; - camera.transform.position = cameraPosition; - camera.orthographicSize = Mathf.Clamp(option.currentDistance, option.minDistance, option.maxDistance); - - if (option.currentElevation <= 90f) - { - camera.transform.rotation = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f); - } - else - { - camera.transform.LookAt(option.target); - } + camera.transform.LookAt(cameraPivot.transform); } } - public override void Rewind() + public void Rewind() { - option.target.position = option.originTargetPos; - option.target.eulerAngles = option.originTargetRot; - option.currentDistance = option.originDistance; - option.currentElevation = option.originElevation; - option.currentAzimuth = option.originAzimuth; - var dist = new Vector3(0, 0, -option.currentDistance); - var distPos = Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist; - cameraPosition = option.target.position + distPos; - camera.transform.position = cameraPosition; - camera.transform.LookAt(option.target); - } + SetViewMode(ViewMode.PerspectiveView); + nextPosition = originTargetPos; - void ProcessWinding() - { - if (process > 0f) - { - process = 1f - process; - } - } - - public void SmoothMove(Vector3 pos, float distance, float elevation, float azimuth) - { - StopAllCoroutines(); - StartCoroutine(SmoothMoving(pos, distance, elevation, azimuth)); - } - - IEnumerator SmoothMoving(Vector3 pos, float distance, float elevation, float azimuth) - { - ProcessWinding(); - while (process < 1f) - { - timer += speed_MoveToCamera * Time.deltaTime; - process += timer / duration_MoveToCamera; - MoveToCamera(pos, distance, elevation, azimuth); - yield return null; - } - timer = 0f; - } - void MoveToCamera(Vector3 pos, float distance, float elevation, float azimuth) - { - option.target.position = Vector3.Lerp(option.target.position, pos, process); - option.currentDistance = Mathf.Lerp(option.currentDistance, distance, process); - option.currentElevation = Mathf.LerpAngle(option.currentElevation, elevation, process); - option.currentAzimuth = Mathf.LerpAngle(option.currentAzimuth, azimuth, process); + currentDistance = originValue.x; + currentElevation = originValue.y; + currentAzimuth = originValue.z; - CameraFix(); - } - - public void CameraFix() - { - //option.target.position = nextPostion; - var dist = new Vector3(0, 0, -option.currentDistance); - //option.outlineCamera.orthographicSize = option.currentDistance; - cameraPosition = option.target.position + Quaternion.Euler(option.currentElevation, option.currentAzimuth, 0f) * dist; - camera.transform.position = cameraPosition; - camera.transform.LookAt(option.target); + LastPositioning(); } public void SetViewMode(ViewMode mode) { + if (viewMode == mode) + return; + + SaveViewMode(viewMode); viewMode = mode; + switch (mode) { - case ViewMode.None: - break; - case ViewMode.TopView: - camera.orthographic = true; - option.orthographic = true; - option.isFirstPersonView = false; - CameraTopView(); - break; case ViewMode.PerspectiveView: - camera.orthographic = false; - option.orthographic = false; - option.isFirstPersonView = false; - CameraPerspectiveView(); + SetPerspectiveView(); break; - case ViewMode.FirstPersonView: - camera.orthographic = false; - option.orthographic = false; - option.isFirstPersonView = true; - CameraFirstPersonView(); + + case ViewMode.TopView: + SetOrthographicView(); break; } + LastPositioning(); onChangeViewMode?.Invoke(viewMode); } - public void CameraTopView() + private void SetPerspectiveView() { - var saveData = saveTargetPositions[ViewMode.TopView]; - option.maxDistance = 50f; + camera.orthographic = false; - if (saveData == null) - { - nextPosition = new Vector3(52.3f, 47.3f, 209.4f); - option.currentElevation = 90f; - option.currentDistance = 35f; - option.currentAzimuth = 0f; - } - else - { - SetCameraData(viewMode); - } + currentElevation = perspectiveState.elevation; //90 + currentDistance = perspectiveState.distance; + currentAzimuth = perspectiveState.azimuth; - LastPositioning(true); + nextPosition = perspectiveState.pivotPosition; } - public void CameraFirstPersonView() + private void SetOrthographicView() { - var saveData = saveTargetPositions[ViewMode.FirstPersonView]; + camera.orthographic = true; - if (saveData == null) - { - camera.transform.position = option.target.position; - option.currentDistance = 5f; - option.currentElevation = 0f; - option.currentAzimuth = 0f; - } - else - { - SetCameraData(viewMode); - } + currentElevation = orthoState.elevation; + currentDistance = orthoState.distance; + currentAzimuth = orthoState.azimuth; + camera.orthographicSize = orthoState.distance; - LastPositioning(true); + nextPosition = orthoState.pivotPosition; } - public void CameraPerspectiveView() - { - var saveData = saveTargetPositions[ViewMode.PerspectiveView]; - option.maxDistance = 60f; - if (saveData == null) - { - option.currentDistance = option.originDistance; - option.currentAzimuth = option.originAzimuth; - option.currentElevation = option.originElevation; - } - else - { - SetCameraData(viewMode); - } - - LastPositioning(true); - } public void SetTargetPos(Vector3 pos) { nextPosition = pos; - LastPositioning(true); + LastPositioning(); } - private void FindLookAtObject() + + private void SaveViewMode(ViewMode mode) { - switch(viewMode) + switch (mode) { case ViewMode.PerspectiveView: - PerspectiveViewCenterRay(); + perspectiveState.elevation = currentElevation; + perspectiveState.distance = currentDistance; + perspectiveState.azimuth = currentAzimuth; + perspectiveState.pivotPosition = cameraPivot.transform.position; break; - case ViewMode.FirstPersonView: - FirstPersonViewRay(); + + case ViewMode.TopView: + orthoState.elevation = 90f; // 90 or + orthoState.distance = currentDistance; + orthoState.azimuth = currentAzimuth; + orthoState.pivotPosition = cameraPivot.transform.position; break; } } - - private void PerspectiveViewCenterRay() - { - var dir = option.target.position - camera.transform.localPosition; - var distance = Vector3.Distance(option.target.position, camera.transform.localPosition); - var hits = Physics.RaycastAll(camera.transform.position, dir, distance); - //Debug.DrawRay(camera.transform.position, dir * distance, Color.blue); - onPerspectiveView?.Invoke(hits, option.target); - } - - private void FirstPersonViewRay() - { - if (Physics.Raycast(camera.transform.position, transform.forward, out RaycastHit hit, Mathf.Infinity)) - { - onFirstPersonViewRay?.Invoke(hit); - } - } - public void SaveTargetPosition(int floorIndex) - { - var cameraEntity = new CameraEntity(); - cameraEntity.x = option.target.position.x; - cameraEntity.y = option.target.position.y; - cameraEntity.z = option.target.position.z; - cameraEntity.distance = option.currentDistance; - cameraEntity.azimuth = option.currentAzimuth; - cameraEntity.elevation = option.currentElevation; - cameraEntity.floorIndex = floorIndex; - - saveTargetPositions[viewMode] = cameraEntity; - } - private void SetCameraData(ViewMode currentViewMode) - { - var cameraData = saveTargetPositions[currentViewMode]; - - nextPosition = new Vector3(cameraData.x, cameraData.y, cameraData.z); - option.currentDistance = cameraData.distance; - option.currentAzimuth = cameraData.azimuth; - option.currentElevation = cameraData.elevation; - } } } \ No newline at end of file diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs deleted file mode 100644 index c9d732ec..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using UnityEngine; - -namespace WI -{ - - [CreateAssetMenu(fileName = "OrbitalControllerOption", menuName = "GenericControllerOption/OrbitalControllerOption")] - public class OrbitalControllerOption : GenericControllerOption - { - [Header("Elevation")] - public float originElevation; - public float currentElevation; - public float elevationSensivity; - public float minElevation; - public float maxElevation; - - [Header("Azimuth")] - public float originAzimuth; - public float currentAzimuth; - public float azimuthSensivity; - public float maxDistance; - public float minDistance; - public float moveClamper; - - public float originDistance; - - public Vector3 originTargetPos; - public Vector3 originTargetRot; - public float currentDistance; - public Transform target; - //public Camera outlineCamera; - - public override void Apply(GenericController controller) - { - target = controller.FindSingle().transform; - //outlineCamera = FindObjectOfType().outlineCamera; - base.Apply(controller); - originTargetPos = target.position; - originTargetRot = target.eulerAngles; - currentAzimuth = originAzimuth; - currentDistance = originDistance; - currentElevation = originElevation; - //outlineCamera.orthographicSize = originDistance; - } - public override void OnAfterDeserialize() - { - base.OnAfterDeserialize(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs.meta b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs.meta deleted file mode 100644 index 435b44e6..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerOption.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0d55d555ae3a31a439ca5986c6199986 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerTarget.cs b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerTarget.cs index e738dece..ef17e886 100644 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerTarget.cs +++ b/Assets/Plugins/XRLib/GenericController/Orbital/OrbitalControllerTarget.cs @@ -1,29 +1,21 @@ -using System; +using System; using UnityEngine; using System.Collections; namespace WI { - public class OrbitalControllerTarget : MonoBehaviour, ISingle + public class OrbitalControllerTarget : MonoBehaviour { OrbitalController controller; - OrbitalControllerOption option; - - public bool alwaysActive = false; - public bool active = false; - public override void AfterAwake() + public void Awake() { - controller = FindSingle(); - option = controller.option; + controller = FindAnyObjectByType(); } private void OnTriggerStay(Collider floorWall) { - if (controller.viewMode != ViewMode.FirstPersonView) - return; - SetPosToOutsideWall(floorWall); } diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs b/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs deleted file mode 100644 index c55f3b2f..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace WI -{ - public class OutlineCamera : MonoBehaviour - { - public Camera outlineCamera; - } -} - diff --git a/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs.meta b/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs.meta deleted file mode 100644 index 3373d13c..00000000 --- a/Assets/Plugins/XRLib/GenericController/Orbital/OutlineCamera.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: afa268d7e935a6844be5d4fabd0fed3d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/XRLib/GenericController/Raycaster.cs b/Assets/Plugins/XRLib/GenericController/Raycaster.cs deleted file mode 100644 index 8350a6c0..00000000 --- a/Assets/Plugins/XRLib/GenericController/Raycaster.cs +++ /dev/null @@ -1,402 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -#if UNITY_EDITOR -using UnityEditor.Presets; -#endif -using UnityEngine; -using UnityEngine.EventSystems; - -namespace WI -{ - [DefaultExecutionOrder(int.MinValue)] - public class Raycaster : MonoBehaviour, ISingle - { - PointerEventData pointerEvent = new(EventSystem.current); - List uiRaycastResults = new(); - RaycastHit[] hitInfo = new RaycastHit[16]; - RaycastHit[] tempInfo; - HashSet typeLayers = new(); - Dictionary> onExitEvent = new(); - Dictionary> onStayEvent = new(); - Dictionary> onEnterEvent = new(); - Dictionary> onLeftClickEvent = new(); - Dictionary> onRightClickEvent = new(); - - Dictionary> onLeftClickFirst = new(); - Dictionary> onRightClickFirst = new(); - Dictionary> onEnterFirst = new(); - Dictionary> onStayFirst = new(); - Dictionary> onExitFirst = new(); - - bool onLeftClick; - bool onRightClick; - Dictionary firstHit = new(); - Dictionary tempFirstHit = new(); - Dictionary fth = new(); - - int hitCount; - - Camera cam; - public RaycastHit hit => hitInfo[0]; - HashSet hitTransform = new(); - HashSet tempHit = new(); - Dictionary transformToHitinfo = new(); - List<(Action, RaycastHit, Component)> eventList = new(); - - public float uiHoverTime; - float uiHoverTimer; -#pragma warning disable IDE0044 // 읽기 전용 한정자 추가 -#pragma warning disable CS0649 // 'Raycaster.onUIHoverEvent' 필드에는 할당되지 않으므로 항상 null 기본값을 사용합니다. - Action onUIHoverEvent; -#pragma warning restore CS0649 -#pragma warning restore IDE0044 - GameObject prevOnUI; - - - void Awake() - { - cam = Camera.main; - } - - void Update() - { - UIRaycast(); - PhysicsRaycast(); - EventInvoking(); - } - - void EventInvoking() - { - foreach(var e in eventList) - { - e.Item1.Invoke(e.Item2, e.Item3); - } - eventList.Clear(); - } - void UIRaycast() - { - pointerEvent.position = Input.mousePosition; - EventSystem.current.RaycastAll(pointerEvent, uiRaycastResults); - - if(uiRaycastResults.Count != 0) - { - if (uiRaycastResults[0].gameObject == null) - { - return; - } - if (prevOnUI != uiRaycastResults[0].gameObject) - { - uiHoverTimer = 0f; - prevOnUI = uiRaycastResults[0].gameObject; - } - - if (uiHoverTimer >= uiHoverTime) - { - onUIHoverEvent?.Invoke(uiRaycastResults[0]); - } - else - { - uiHoverTimer += Time.deltaTime; - } - } - else - { - prevOnUI = null; - } - } - - void PhysicsRaycast() - { - onLeftClick = Input.GetMouseButtonDown(0); - onRightClick = Input.GetMouseButtonDown(1); - Rayfire(); - SingleCasting(); - MultiCasting(); - } - - void Rayfire() - { - var ray = cam.ScreenPointToRay(Input.mousePosition); - //Physics.Raycast(ray, out singleHit, Mathf.Infinity); - tempInfo = new RaycastHit[16]; - hitCount = Physics.RaycastNonAlloc(ray, tempInfo, Mathf.Infinity); - hitInfo = SortingHitInfos(tempInfo); - } - - public bool Casting(LayerMask layer, out RaycastHit hit) - { - hit = new RaycastHit(); - if (hitCount == 0) - { - return false; - } - - foreach (var h in hitInfo) - { - if (h.transform == null) - continue; - - if ((layer.value >> h.transform.gameObject.layer) == 1) - { - hit = h; - return true; - } - } - return false; - } - - void SingleCasting(in RaycastHit hitInfo) - { - fth.TryAdd(hitInfo.transform, hitInfo); - - foreach (var tl in typeLayers) - { - SingleCasting(hitInfo, tl); - } - } - - void SingleCasting(in RaycastHit hitInfo, Type tl) - { - if (tempFirstHit.ContainsKey(tl)) - { - return; - } - - if (!hitInfo.transform.TryGetComponent(tl, out var value)) - return; - - if (firstHit.Remove(tl, out var prev)) - { - if (prev.transform == hitInfo.transform) - { - //Debug.Log($"OnStayFirst : {prev.transform.name}"); - EventInvoke(onStayFirst, tl, hitInfo, value); - } - else - { - //Debug.Log($"OnExitFirst : {prev.transform.name}"); - EventInvoke(onExitFirst, tl, prev, prev.transform.GetComponent(tl)); - - //Debug.Log($"OnEnterFirst : {hitInfo.transform.name}"); - EventInvoke(onEnterFirst, tl, hitInfo, value); - fth.Remove(prev.transform); - } - } - else - { - //Debug.Log($"OnEnterFirst : {hitInfo.transform.name}"); - - EventInvoke(onEnterFirst, tl, hitInfo, value); - } - fth[hitInfo.transform] = hitInfo; - tempFirstHit.Add(tl, hitInfo); - } - - void SingleCasting() - { - //fth.Clear(); - tempFirstHit.Clear(); - for (int i = 0; i < hitCount; ++i) - { - SingleCasting(hitInfo[i]); - } - - FirstExitEvent(); - FirstClickEvent(); - } - void FirstClickEvent() - { - - foreach (var p in tempFirstHit) - { - firstHit.Add(p.Key, p.Value); - - if (onLeftClick) - { - EventInvoke(onLeftClickFirst, p.Key, p.Value, p.Value.transform.GetComponent(p.Key)); - } - if (onRightClick) - { - EventInvoke(onRightClickFirst, p.Key, p.Value, p.Value.transform.GetComponent(p.Key)); - } - } - } - - void FirstExitEvent() - { - foreach (var f in firstHit) - { - //Debug.Log($"OnExitFirst :{f.Value.transform.name}"); - if (f.Value.transform == null) - continue; - - EventInvoke(onExitFirst, f.Key, f.Value, f.Value.transform.GetComponent(f.Key)); - fth.Remove(f.Value.transform); - //tempFirstHit.Remove(f.Key); - } - firstHit.Clear(); - } - - RaycastHit[] SortingHitInfos(in RaycastHit[] hitInfo) - { - if (hitInfo[0].transform == null) - return null; - - var sortHitInfo = hitInfo.Where(hi => hi.transform != null).OrderBy(hi => hi.distance).ToArray(); - //var sortHitInfo = hitInfo.OrderBy(hi => hi.distance).ToArray(); - - return sortHitInfo; - } - - void HitCheck(int hitIndex) - { - var ht = hitInfo[hitIndex].transform; - tempHit.Add(ht); - transformToHitinfo.TryAdd(ht, hitInfo[hitIndex]); - bool isStay = hitTransform.Remove(ht); - - foreach (var tl in typeLayers) - { - if (!ht.TryGetComponent(tl, out var value)) - continue; - - if (onLeftClick) - { - EventInvoke(onLeftClickEvent, tl, hitInfo[hitIndex], value); - //Debug.Log($"OnClick {tl} {value}"); - } - if (onRightClick) - { - EventInvoke(onRightClickEvent, tl, hitInfo[hitIndex], value); - } - - if (!isStay) - { - //Debug.Log($"OnEnter {tl} {value}"); - EventInvoke(onEnterEvent, tl, hitInfo[hitIndex], value); - } - else - { - EventInvoke(onStayEvent, tl, hitInfo[hitIndex], value); - //Debug.Log($"OnStay {tl} {value}"); - } - } - } - - void MultiCasting() - { - tempHit.Clear(); - for (int i = 0; i < hitCount; ++i) - { - HitCheck(i); - } - - foreach (var h in hitTransform) - { - if (h == null) - continue; - foreach (var tl in typeLayers) - { - if (!h.TryGetComponent(tl, out var value)) - continue; - - EventInvoke(onExitEvent, tl, transformToHitinfo[h], value); - } - transformToHitinfo.Remove(h); - } - - hitTransform.Clear(); - foreach (var p in tempHit) - { - hitTransform.Add(p); - } - } - void EventInvoke(Dictionary> eventTable, Type layer, in RaycastHit hitInfo, Component value) - { - if (eventTable.TryGetValue(layer, out var action)) - { - eventList.Add((action,hitInfo, value)); - //action?.Invoke(hitInfo, value); - } - } - - public bool IsFirstHit(Transform target) - { - if (hitInfo.Length == 0) - return false; - return hitInfo[0].transform == target; - } - - public void AddTypeLayer(Type t) - { - typeLayers.Add(t); - typeLayers.RemoveWhere(t => t == null); - } - - public void RemoveTypeLayer() - { - typeLayers.Remove(typeof(T)); - } - - public void AddEvent_FirstEnter(Type layer, Action action) - { - onEnterFirst.TryAdd(layer, null); - onEnterFirst[layer] += action; - } - - public void AddEvent_FirstExit(Type layer, Action action) - { - onExitFirst.TryAdd(layer, null); - onExitFirst[layer] += action; - } - - public void AddEvent_FirstStay(Type layer, Action action) - { - onStayFirst.TryAdd(layer, null); - onStayFirst[layer] += action; - } - - public void AddEvent_FirstLeftClick(Type layer, Action action) - { - onLeftClickFirst.TryAdd(layer, null); - onLeftClickFirst[layer] += action; - } - - public void AddEvent_FirstRightClick(Type layer, Action action) - { - onRightClickFirst.TryAdd(layer, null); - onRightClickFirst[layer] += action; - } - - public void AddEvent_RightClick(Type layer, Action action) - { - onRightClickEvent.TryAdd(layer, null); - onRightClickEvent[layer] += action; - } - - public void AddEvent_Enter(Type layer, Action action) - { - onEnterEvent.TryAdd(layer, null); - onEnterEvent[layer] += action; - } - - public void AddEvent_Exit(Type layer, Action action) - { - onExitEvent.TryAdd(layer, null); - onExitEvent[layer] += action; - } - - public void AddEvent_Stay(Type layer, Action action) - { - onStayEvent.TryAdd(layer, null); - onStayEvent[layer] += action; - } - - public void AddEvent_LeftClick(Type layer, Action action) - { - onLeftClickEvent.TryAdd(layer, null); - onLeftClickEvent[layer] += action; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/XRLib/GenericController/Raycaster.cs.meta b/Assets/Plugins/XRLib/GenericController/Raycaster.cs.meta deleted file mode 100644 index 6f383509..00000000 --- a/Assets/Plugins/XRLib/GenericController/Raycaster.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 73c8199685949fb4eb02e83a235ec68b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 68689376..c4085a47 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -542,11 +542,6 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] ---- !u!4 &33659229 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - m_PrefabInstance: {fileID: 1969209925} - m_PrefabAsset: {fileID: 0} --- !u!1 &49187855 GameObject: m_ObjectHideFlags: 0 @@ -700,7 +695,7 @@ Transform: - {fileID: 311806352} - {fileID: 1119818303} - {fileID: 270955323} - - {fileID: 33659229} + - {fileID: 3992366463622774082} - {fileID: 415074187} - {fileID: 716152919} - {fileID: 1936102453} @@ -3474,6 +3469,17 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 208193137} m_CullTransparentMesh: 1 +--- !u!114 &210712101 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6261162410268618183, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &215489148 GameObject: m_ObjectHideFlags: 0 @@ -6164,6 +6170,11 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 364709506} m_CullTransparentMesh: 1 +--- !u!1 &367605669 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3143323585188192883, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} --- !u!1 &369755196 GameObject: m_ObjectHideFlags: 0 @@ -9213,6 +9224,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: {x: -8, y: -5, z: -8, w: -5} m_Softness: {x: 0, y: 0} +--- !u!114 &515764191 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4184018941781392851, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &516316033 GameObject: m_ObjectHideFlags: 0 @@ -14917,6 +14939,17 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 766238987} m_CullTransparentMesh: 1 +--- !u!114 &774298016 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4765074342053365812, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &784038655 GameObject: m_ObjectHideFlags: 0 @@ -17726,6 +17759,17 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 5290342058106165413, guid: 1e2f1310fcc725c4a82bd8a7a783ca22, type: 3} m_PrefabInstance: {fileID: 1837017872} m_PrefabAsset: {fileID: 0} +--- !u!114 &900666749 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5901532726994830447, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &903456540 GameObject: m_ObjectHideFlags: 0 @@ -21355,8 +21399,6 @@ MonoBehaviour: Button_ProductionProgress: {fileID: 0} Button_AssemblyProgress: {fileID: 0} Button_FinalInspection: {fileID: 0} - Button_AssemblyProgressLine: {fileID: 0} - Button_MoldDepartment: {fileID: 0} Button_Alrams: {fileID: 0} Button_Setting: {fileID: 0} Button_Exit: {fileID: 0} @@ -25124,6 +25166,17 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1221147949} m_CullTransparentMesh: 1 +--- !u!114 &1233672940 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 290325765835358597, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1238470209 GameObject: m_ObjectHideFlags: 0 @@ -33842,9 +33895,6 @@ MonoBehaviour: panel_machinedeleteregistration: {fileID: 0} panel_machinecorrection: {fileID: 0} dashboardPoint: {fileID: 0} - currentDashBoard: {fileID: 0} - isSimpleDashboardAcitve: 0 - panel_controlsetting: {fileID: 0} panel_protocolsetting: {fileID: 0} --- !u!114 &1673135434 MonoBehaviour: @@ -34046,6 +34096,17 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1678468758} m_CullTransparentMesh: 1 +--- !u!114 &1681443528 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8015710047439777487, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + m_PrefabInstance: {fileID: 8701733059700470084} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3364ac7fbd47c0049b73d3079868c38b, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1684204578 GameObject: m_ObjectHideFlags: 0 @@ -34843,55 +34904,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1711964009} m_CullTransparentMesh: 1 ---- !u!1 &1712232313 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 4602595839876627761, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - m_PrefabInstance: {fileID: 1969209925} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1712232315 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1712232313} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_VolumeFrameworkUpdateModeOption: 2 - m_RenderPostProcessing: 1 - m_Antialiasing: 3 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_AllowHDROutput: 1 - m_UseScreenCoordOverride: 0 - m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} - m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_Version: 2 - m_TaaSettings: - m_Quality: 2 - m_FrameInfluence: 0.100000024 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0.2 --- !u!1 &1714761417 GameObject: m_ObjectHideFlags: 0 @@ -37694,7 +37706,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5774997430431792511, guid: b59b3195a2b1ed64ebe226010a38ae94, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 6187420705898449986, guid: b59b3195a2b1ed64ebe226010a38ae94, type: 3} propertyPath: m_Pivot.x @@ -37840,7 +37852,8 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 0.1836572 objectReference: {fileID: 0} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 6780060098680629457, guid: b59b3195a2b1ed64ebe226010a38ae94, type: 3} m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] @@ -40167,239 +40180,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1001 &1969209925 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 49225333} - m_Modifications: - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.x - value: -55.4 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.y - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.z - value: 30.7 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.w - value: 0.44578564 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.x - value: 0.12810983 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.y - value: 0.8514625 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.z - value: -0.24469325 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 32.067 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 124.731 - objectReference: {fileID: 0} - - target: {fileID: 135340969371884068, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_HDR - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Depth - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_AllowMSAA - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: far clip plane - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_TargetTexture - value: - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: near clip plane - value: 0.2 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_OcclusionCulling - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1769739476192758786, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_CullingMask.m_Bits - value: 32247 - objectReference: {fileID: 0} - - target: {fileID: 2097398073062650089, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Size.x - value: 96.86835 - objectReference: {fileID: 0} - - target: {fileID: 2097398073062650089, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Size.z - value: 62.704876 - objectReference: {fileID: 0} - - target: {fileID: 2097398073062650089, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2097398073062650089, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Center.x - value: 8.683212 - objectReference: {fileID: 0} - - target: {fileID: 2097398073062650089, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Center.z - value: -0.14234161 - objectReference: {fileID: 0} - - target: {fileID: 2656137905910655519, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: radi - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: yUpPos - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: runSpeed - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: nextPosition.x - value: 9.714996 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: nextPosition.y - value: 57.3 - objectReference: {fileID: 0} - - target: {fileID: 2795261250788500754, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: nextPosition.z - value: 236.9934 - objectReference: {fileID: 0} - - target: {fileID: 3640034311448942995, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.x - value: -37.685005 - objectReference: {fileID: 0} - - target: {fileID: 3640034311448942995, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.z - value: 29.893412 - objectReference: {fileID: 0} - - target: {fileID: 4212222602616332980, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_CastShadows - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6477979063903699244, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: stopNaNs - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6477979063903699244, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: dithering - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6477979063903699244, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: antialiasing - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 6477979063903699244, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: volumeLayerMask.m_Bits - value: 2147483649 - objectReference: {fileID: 0} - - target: {fileID: 6689677178373688372, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7888456699290281049, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8457166540169997683, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9065749286782967344, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_Name - value: Controller - objectReference: {fileID: 0} - - target: {fileID: 9065749286782967344, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 9069679373307880458, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: InitialModule.startColor.maxColor.b - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9069679373307880458, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: InitialModule.startColor.maxColor.g - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9069679373307880458, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - propertyPath: InitialModule.startColor.maxColor.r - value: 1 - objectReference: {fileID: 0} - m_RemovedComponents: - - {fileID: 6477979063903699244, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 4602595839876627761, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} - insertIndex: -1 - addedObject: {fileID: 1712232315} - m_SourcePrefab: {fileID: 100100000, guid: e8aa14877be9b924882fcad9d88abe46, type: 3} --- !u!1 &1971695965 GameObject: m_ObjectHideFlags: 0 @@ -44930,6 +44710,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!4 &289514793767337717 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322669169910222201} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3992366463622774082} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &543450652765985303 stripped Transform: m_CorrespondingSourceObject: {fileID: 8063966845845817783, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} @@ -44965,6 +44760,43 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 4 +--- !u!1 &673529244681525847 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6628738256313926463} + - component: {fileID: 3316918087339060068} + - component: {fileID: 7661166344626072402} + - component: {fileID: 6999404541576683528} + m_Layer: 10 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1322669169910222201 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 289514793767337717} + - component: {fileID: 2476445388581388070} + - component: {fileID: 4948563083304796563} + m_Layer: 0 + m_Name: PRF_ControllerViewTarget + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 --- !u!114 &1605505227343304781 MonoBehaviour: m_ObjectHideFlags: 0 @@ -45111,6 +44943,69 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fe2efe24ec12f0741a449954f91f3c35, type: 3} +--- !u!114 &2476445388581388070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322669169910222201} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eab1a07f8f5c6754a8f2a9789fb6b020, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!20 &3316918087339060068 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 673529244681525847} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 --- !u!224 &3516895482578052139 RectTransform: m_ObjectHideFlags: 0 @@ -45231,6 +45126,23 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 58b52bb498791ed40bfa7aff20e1f0e4, type: 3} +--- !u!4 &3992366463622774082 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5428927936443857238} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 289514793767337717} + - {fileID: 6628738256313926463} + m_Father: {fileID: 49225333} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!222 &4219095924724536526 CanvasRenderer: m_ObjectHideFlags: 0 @@ -45258,6 +45170,27 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 0 +--- !u!135 &4948563083304796563 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322669169910222201} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 0.25 + m_Center: {x: 0, y: 0, z: 0} --- !u!114 &5257701773514832337 MonoBehaviour: m_ObjectHideFlags: 0 @@ -45288,6 +45221,47 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5428927936443857238 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3992366463622774082} + - component: {fileID: 5428927936443857239} + m_Layer: 0 + m_Name: Controller + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &5428927936443857239 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5428927936443857238} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fafd8d68ae7258c4485adb2fffef3373, type: 3} + m_Name: + m_EditorClassIdentifier: + viewMode: 1 + moveSpeed: 5 + rotateSpeed: 60 + zoomSpeed: 100 + maxElevation: 90 + minElevation: 5 + minDistance: 2 + maxDistance: 60 + currentElevation: 55 + currentDistance: 30 + currentAzimuth: 32 + cameraPivot: {fileID: 0} --- !u!224 &6011291902712399202 RectTransform: m_ObjectHideFlags: 0 @@ -45307,6 +45281,21 @@ RectTransform: m_AnchoredPosition: {x: -56.8, y: -52} m_SizeDelta: {x: 30, y: 30} m_Pivot: {x: 0.5, y: 0.5} +--- !u!4 &6628738256313926463 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 673529244681525847} + serializedVersion: 2 + m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535} + m_LocalPosition: {x: -45, y: 62.35534, z: -45} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3992366463622774082} + m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} --- !u!224 &6655705348909782899 RectTransform: m_ObjectHideFlags: 0 @@ -45335,6 +45324,50 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 5136685362653072439, guid: fe2efe24ec12f0741a449954f91f3c35, type: 3} m_PrefabInstance: {fileID: 2387194483665702846} m_PrefabAsset: {fileID: 0} +--- !u!114 &6999404541576683528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 673529244681525847} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!222 &7069949033335198431 CanvasRenderer: m_ObjectHideFlags: 0 @@ -45371,6 +45404,29 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 140193031238434938} m_CullTransparentMesh: 1 +--- !u!136 &7661166344626072402 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 673529244681525847} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} --- !u!224 &8012176388805653818 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 9014463343716695441, guid: 58b52bb498791ed40bfa7aff20e1f0e4, type: 3} @@ -45508,14 +45564,54 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1818419964} m_Modifications: + - target: {fileID: 260710473908205888, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 1600303972707744018, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} propertyPath: m_Name value: Chunil objectReference: {fileID: 0} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: floors.Array.size + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[0]' + value: + objectReference: {fileID: 774298016} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[1]' + value: + objectReference: {fileID: 515764191} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[2]' + value: + objectReference: {fileID: 900666749} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[3]' + value: + objectReference: {fileID: 210712101} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[4]' + value: + objectReference: {fileID: 1233672940} + - target: {fileID: 2521218806508010177, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: 'floors.Array.data[5]' + value: + objectReference: {fileID: 1681443528} - target: {fileID: 3951875329995553383, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} propertyPath: m_LocalPosition.z value: -4.74 objectReference: {fileID: 0} + - target: {fileID: 4765074342053365812, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: Ceiling + value: + objectReference: {fileID: 367605669} + - target: {fileID: 5901532726994830447, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} + propertyPath: isEmptyFloor + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8063966845845817783, guid: 02de84299dbbd354fa8fe07b680d5d8c, type: 3} propertyPath: m_LocalPosition.x value: -7.7 diff --git a/Assets/Plugins/XRLib/GenericController/Options.meta b/Assets/Scripts/Camera.meta similarity index 77% rename from Assets/Plugins/XRLib/GenericController/Options.meta rename to Assets/Scripts/Camera.meta index 60c2c275..7492525c 100644 --- a/Assets/Plugins/XRLib/GenericController/Options.meta +++ b/Assets/Scripts/Camera.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1f68ff29096c80243ad9a2559d426c83 +guid: 7631964abe958ba48a6accd98e930acc folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/Custom/Manager/ThermostatIconManager.cs b/Assets/Scripts/Custom/Manager/ThermostatIconManager.cs index 4a1723e7..a072c6fb 100644 --- a/Assets/Scripts/Custom/Manager/ThermostatIconManager.cs +++ b/Assets/Scripts/Custom/Manager/ThermostatIconManager.cs @@ -33,7 +33,7 @@ namespace CHN private void SetThermostatUI() { cam = FindSingle(); - prefab_thermostatIcon = Resources.Load("Prefabs/UI/PRF_UI_ThermostatIcon"); + prefab_thermostatIcon = Resources.Load("UI/Prefabs/PRF_UI_ThermostatIcon"); var building = FindSingle(); thermostats = building.floors.SelectMany(f => f.thermostats).ToArray(); @@ -61,7 +61,7 @@ namespace CHN foreach (var thermostat in thermostats) { var thermostatPost = thermostat.centerPos; - var screenPos = cam.camera.WorldToScreenPoint(new Vector3(thermostatPost.x, thermostatPost.y + defaultNameHeight, thermostatPost.z)); + var screenPos = Camera.main.WorldToScreenPoint(new Vector3(thermostatPost.x, thermostatPost.y + defaultNameHeight, thermostatPost.z)); thermostat.thermostatIcon.transform.position = screenPos; } @@ -70,7 +70,7 @@ namespace CHN { var layerMask = LayerMask.GetMask("Camera", "Floor Wall"); - float t = Mathf.InverseLerp(cam.option.maxDistance, 0f, cam.option.currentDistance); + float t = Mathf.InverseLerp(cam.maxDistance, 0f, cam.currentDistance); float scale = Mathf.Lerp(minScale, maxScale, t); var newScale = new Vector3(scale, scale, scale); @@ -83,7 +83,7 @@ namespace CHN } bool IsScreenRange(Thermostat thermostat) { - Vector3 viewPos = cam.camera.WorldToViewportPoint(thermostat.centerPos); + Vector3 viewPos = Camera.main.WorldToViewportPoint(thermostat.centerPos); if (viewPos.x >= 0 && viewPos.x <= 1 && viewPos.y >= 0 && viewPos.y <= 1 && viewPos.z > 0) { @@ -96,7 +96,7 @@ namespace CHN var currentFloor = FindSingle().currentFloor; var thermostatInFloor = thermostat.GetComponentInParent(); - var dir = cam.camera.transform.position - thermostat.centerPos; + var dir = Camera.main.transform.position - thermostat.centerPos; var hit = new RaycastHit(); if (thermostatInFloor != currentFloor) diff --git a/Assets/Scripts/Custom/UI/Panel_AssemblyProduction.cs b/Assets/Scripts/Custom/UI/Panel_AssemblyProduction.cs index 0bd18e90..d2603280 100644 --- a/Assets/Scripts/Custom/UI/Panel_AssemblyProduction.cs +++ b/Assets/Scripts/Custom/UI/Panel_AssemblyProduction.cs @@ -29,7 +29,7 @@ public class Panel_AssemblyProduction : PanelBase, IDashboardUI public Action onClose; public override void AfterAwake() { - prf_statusContent = Resources.Load("Prefabs/UI/UI_StatusContent"); + prf_statusContent = Resources.Load("UI/Prefabs/UI_StatusContent"); CloseButton.onClick.AddListener(OnClickCloseButton); SetDate(); Close(); diff --git a/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs b/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs deleted file mode 100644 index ea0702be..00000000 --- a/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using WI; -using UnityEngine.UI; -using TMPro; - -namespace CHN -{ - - public class Panel_ControlSetting : SettingPanel - { - KeyCode[] keyCodes; - - OrbitalController orbitalController; - private OptionManager optionManager; - private Dictionary controlButton = new Dictionary(); - private Dictionary initControlOptions = new Dictionary(); - private Dictionary mappingControlOptions = new Dictionary(); - - private Dictionary controlInputFields = new Dictionary(); - private Dictionary initSpeedOptions = new Dictionary(); - private Dictionary mappingSpeedOptions = new Dictionary(); - - public UI_MappingButton currentClickButton; - public bool isMappingButtonClick; - - public float minMoveSpeed; - public float maxMoveSpeed; - public float minRotateSpeed; - public float maxRotateSpeed; - public float minZoomSpeed; - public float maxZoomSpeed; - - public void InitOptionSetting() - { - keyCodes = (KeyCode[])Enum.GetValues(typeof(KeyCode)); - - orbitalController = FindSingle(); - optionManager = FindSingle(); - var controlOption = optionManager.GetOption(orbitalController); - - var mappingButtons = GetComponentsInChildren(); - foreach (var mappingButton in mappingButtons) - { - mappingButton.SetMappingButton(); - - controlButton.Add(mappingButton.button.name, mappingButton); - initControlOptions.Add(mappingButton.button.name, controlOption[mappingButton.button.name]); - mappingButton.Value.SetText(controlOption[mappingButton.button.name]); - mappingButton.onClickButton += OnClickButton; - } - - var inputFields = GetComponentsInChildren(); - foreach(var inputField in inputFields) - { - inputField.SetSliderInputField(); - - controlInputFields.Add(inputField.name, inputField); - initSpeedOptions.Add(inputField.name, controlOption[inputField.name]); - SliderValueWithInRanage(inputField.name); - inputField.SetText(controlOption[inputField.name]); - } - } - - private void OnClickButton(UI_MappingButton currentButton) - { - if (currentClickButton != null) - { - currentClickButton.ReductionLine(); - currentClickButton.isClick = false; - } - - isMappingButtonClick = true; - currentClickButton = currentButton; - currentClickButton.isClick = true; - currentClickButton.ExpandLine(); - } - - private void Update() - { - if (!isMappingButtonClick) - return; - - foreach (KeyCode keyCode in keyCodes) - { - if (IsMouseClick()) - return; - - if (Input.GetKeyDown(keyCode)) - { - currentClickButton.Value.SetText(InputKeyCode(keyCode).ToString()); - - currentClickButton.Line.transform.localScale = new Vector3(0f,1f,1f); - currentClickButton.isClick = false; - isMappingButtonClick = false; - } - } - } - KeyCode InputKeyCode(KeyCode inputKeyCode) - { - foreach (var button in controlButton.Values) - { - var buttonText = button.Value; - - if (buttonText.text == inputKeyCode.ToString()) - { - return (KeyCode)Enum.Parse(typeof(KeyCode), currentClickButton.Value.text); - } - } - return inputKeyCode; - } - bool IsMouseClick() - { - bool isMouseClick = Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2); - return isMouseClick; - } - - public void SliderValueWithInRanage(string key) - { - float maxValue = 0; - float minValue = 0; - - switch (key) - { - case "MoveSpeed": - maxValue = maxMoveSpeed; - minValue = minMoveSpeed; - break; - case "RotateSpeed": - maxValue = maxRotateSpeed; - minValue = minRotateSpeed; - break; - case "ZoomSpeed": - maxValue = maxZoomSpeed; - minValue = minRotateSpeed; - break; - } - controlInputFields[key].Slider.minValue = minValue; - controlInputFields[key].Slider.maxValue = maxValue; - - } - public void AdjustTextValueWithinRange(string key) - { - float value = float.Parse(mappingSpeedOptions[key]); - - float maxValue = 0; - float minValue = 0; - - switch (key) - { - case "MoveSpeed": - maxValue = maxMoveSpeed; - minValue = minMoveSpeed; - break; - case "RotateSpeed": - maxValue = maxRotateSpeed; - minValue = minRotateSpeed; - break; - case "ZoomSpeed": - maxValue = maxZoomSpeed; - minValue = minRotateSpeed; - break; - } - - float withinRangeValue = Mathf.Clamp(value, minValue, maxValue); - mappingSpeedOptions[key] = withinRangeValue.ToString(); - controlInputFields[key].SetText(withinRangeValue.ToString()); - } - - internal override void Reset() - { - var optionManager = FindSingle(); - - foreach (var key in initControlOptions.Keys) - { - controlButton[key].Value.text = initControlOptions[key]; - } - optionManager.SetOptionValue(orbitalController, initControlOptions); - - foreach (var key in initSpeedOptions.Keys) - { - controlInputFields[key].SetText(initSpeedOptions[key]); - } - optionManager.SetOptionValue(orbitalController, initSpeedOptions); - orbitalController.SetControllOptionValue(); - } - - internal override void Accept() - { - var optionManager = FindSingle(); - - mappingControlOptions.Clear(); - mappingSpeedOptions.Clear(); - - foreach (var controlButton in controlButton.Values) - { - mappingControlOptions.Add(controlButton.button.name, controlButton.Value.text); - } - optionManager.SetOptionValue(orbitalController, mappingControlOptions); - - foreach (var controlInputField in controlInputFields.Values) - { - mappingSpeedOptions.Add(controlInputField.name, controlInputField.inputField.text); - AdjustTextValueWithinRange(controlInputField.name); - } - optionManager.SetOptionValue(orbitalController, mappingSpeedOptions); - orbitalController.SetControllOptionValue(); - } - internal override void Open() - { - gameObject.SetActive(true); - } - internal override void Close() - { - isMappingButtonClick = false; - - var controlOption = optionManager.GetOption(orbitalController); - foreach (var key in controlButton.Keys) - { - controlButton[key].Value.text = controlOption[key]; - } - foreach (var key in controlInputFields.Keys) - { - controlInputFields[key].inputField.text = controlOption[key]; - } - - if (currentClickButton != null) - { - currentClickButton.Line.transform.localScale = new Vector3(0f, 1f, 1f); - currentClickButton.isClick = false; - } - - gameObject.SetActive(false); - } - } -} diff --git a/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs.meta b/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs.meta deleted file mode 100644 index 0930eeb1..00000000 --- a/Assets/Scripts/Custom/UI/Panel_ControlSetting.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ebbce523cfa4db48ac8f22eba9d7d27 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Custom/UI/Panel_FinalInspection.cs b/Assets/Scripts/Custom/UI/Panel_FinalInspection.cs index 9b2e168f..e7523582 100644 --- a/Assets/Scripts/Custom/UI/Panel_FinalInspection.cs +++ b/Assets/Scripts/Custom/UI/Panel_FinalInspection.cs @@ -29,7 +29,7 @@ public class Panel_FinalInspection : PanelBase, IDashboardUI public Action onClose; public override void AfterAwake() { - prf_statusContent = Resources.Load("Prefabs/UI/UI_StatusContent"); + prf_statusContent = Resources.Load("UI/Prefabs/UI_StatusContent"); effect = FindSingle(); CloseButton.onClick.AddListener(OnClickCloseButton); SetDate(); diff --git a/Assets/Scripts/Custom/UI/Panel_InjectionProduction.cs b/Assets/Scripts/Custom/UI/Panel_InjectionProduction.cs index d5d99aae..92773c0c 100644 --- a/Assets/Scripts/Custom/UI/Panel_InjectionProduction.cs +++ b/Assets/Scripts/Custom/UI/Panel_InjectionProduction.cs @@ -29,7 +29,7 @@ public class Panel_InjectionProduction : PanelBase, IDashboardUI public Action onClose; public override void AfterAwake() { - prf_statusContent = Resources.Load("Prefabs/UI/UI_StatusContent"); + prf_statusContent = Resources.Load("UI/Prefabs/UI_StatusContent"); effect = FindSingle(); CloseButton.onClick.AddListener(OnClickCloseButton); SetDate(); diff --git a/Assets/Scripts/Custom/UI/Panel_Menu.cs b/Assets/Scripts/Custom/UI/Panel_Menu.cs index 2e9f42c5..ac3a0f20 100644 --- a/Assets/Scripts/Custom/UI/Panel_Menu.cs +++ b/Assets/Scripts/Custom/UI/Panel_Menu.cs @@ -55,8 +55,8 @@ namespace CHN if (gameObject.activeSelf) return; - ChangePanel(); - ChangeButtonState(Button_Control); + ChangePanel(); + ChangeButtonState(Button_Protocol); SetActive(true); transform.SetAsLastSibling(); @@ -109,8 +109,8 @@ namespace CHN void OnClickButton_Control() { - ChangeButtonState(Button_Control); - ChangePanel(); + //ChangeButtonState(Button_Control); + //ChangePanel(); } void OnClickButton_Protocol() diff --git a/Assets/Scripts/Custom/UI/Panel_WorkProgressStatus.cs b/Assets/Scripts/Custom/UI/Panel_WorkProgressStatus.cs index 83d17722..c4f00143 100644 --- a/Assets/Scripts/Custom/UI/Panel_WorkProgressStatus.cs +++ b/Assets/Scripts/Custom/UI/Panel_WorkProgressStatus.cs @@ -25,7 +25,7 @@ public class Panel_WorkProgressStatus : PanelBase, IDashboardUI public Action onClose; public override void AfterAwake() { - prf_workStatusItem = Resources.Load("Prefabs/UI/UI_WorkStatusItem"); + prf_workStatusItem = Resources.Load("UI/Prefabs/UI_WorkStatusItem"); CloseButton.onClick.AddListener(OnClickCloseButton); SetDate(); Close(); diff --git a/Assets/Scripts/Custom/UI/UI_Calendar.cs b/Assets/Scripts/Custom/UI/UI_Calendar.cs index f9b7e544..b3b47650 100644 --- a/Assets/Scripts/Custom/UI/UI_Calendar.cs +++ b/Assets/Scripts/Custom/UI/UI_Calendar.cs @@ -35,7 +35,7 @@ public class UI_Calendar : UIBase Button_PrevMonth.onClick.AddListener(OnClickPrevMonth); Button_NextMonth.onClick.AddListener(OnClickNextMonth); - prefab_calendarItem = Resources.Load("Prefabs/UI/PRF_UI_CalendarItem"); + prefab_calendarItem = Resources.Load("UI/Prefabs/PRF_UI_CalendarItem"); float sundayPosX = Text_Sunday.anchoredPosition.x; float mondayPosX = Text_Monday.anchoredPosition.x; float space = mondayPosX - sundayPosX; diff --git a/Assets/Scripts/Custom/UI/UI_StatusContent.cs b/Assets/Scripts/Custom/UI/UI_StatusContent.cs index bf761a26..3f350e86 100644 --- a/Assets/Scripts/Custom/UI/UI_StatusContent.cs +++ b/Assets/Scripts/Custom/UI/UI_StatusContent.cs @@ -10,7 +10,7 @@ public class UI_StatusContent : MonoBehaviour public override void AfterAwake() { - prf_machineStatus = Resources.Load("Prefabs/UI/UI_StatusItem"); + prf_machineStatus = Resources.Load("UI/Prefabs/UI_StatusItem"); } public void SetProductionStatusItem(List machineInfos) { diff --git a/Assets/Scripts/Manager/DataManager.cs b/Assets/Scripts/Manager/DataManager.cs index d904ff02..e7ef59e7 100644 --- a/Assets/Scripts/Manager/DataManager.cs +++ b/Assets/Scripts/Manager/DataManager.cs @@ -192,47 +192,47 @@ namespace CHN #endregion #region õ Ͼ ú - public void MachineDataSetChange(Machine machine, HashSet fields) - { - if (string.IsNullOrEmpty(machine.code)) - return; - var machineName = GapRemove(machine.code); - var simpleField = includeFields[machineName]; - simpleField.simpleField = fields; - includeFields[machineName] = simpleField; - } + //public void MachineDataSetChange(Machine machine, HashSet fields) + //{ + // if (string.IsNullOrEmpty(machine.code)) + // return; + // var machineName = GapRemove(machine.code); + // var simpleField = includeFields[machineName]; + // simpleField.simpleField = fields; + // includeFields[machineName] = simpleField; + //} - public void GetSimpleCompleteData(Machine machine) - { - if (string.IsNullOrEmpty(machine.code)) - return; - var machineName = GapRemove(machine.code); - if (includeFields.ContainsKey(machineName)) - { - includeFields[machineName].machineInfo = mqttDataTable[machineName]; - includeFields[machineName].kpiDataInfo = kpiDataTable[machineName]; - } - else - { - var simpleTest = new MachineDataSet(); - simpleTest.machineName = machineName; - simpleTest.machineInfo = mqttDataTable[machineName]; - simpleTest.kpiDataInfo = kpiDataTable[machineName]; - simpleTest.simpleField = samples; - includeFields.Add(machineName, simpleTest); - } + //public void GetSimpleCompleteData(Machine machine) + //{ + // if (string.IsNullOrEmpty(machine.code)) + // return; + // var machineName = GapRemove(machine.code); + // if (includeFields.ContainsKey(machineName)) + // { + // includeFields[machineName].machineInfo = mqttDataTable[machineName]; + // includeFields[machineName].kpiDataInfo = kpiDataTable[machineName]; + // } + // else + // { + // var simpleTest = new MachineDataSet(); + // simpleTest.machineName = machineName; + // simpleTest.machineInfo = mqttDataTable[machineName]; + // simpleTest.kpiDataInfo = kpiDataTable[machineName]; + // simpleTest.simpleField = samples; + // includeFields.Add(machineName, simpleTest); + // } - onSimpleInfo?.Invoke(machine, includeFields[machineName]); - } + // onSimpleInfo?.Invoke(machine, includeFields[machineName]); + //} - public void GetCompleteInfo(Machine machine) - { - if (string.IsNullOrEmpty(machine.code)) - return; - var machineName = GapRemove(machine.code); - var simpleField = includeFields[machineName]; - onCompleteInfo?.Invoke(machine, simpleField); - } + //public void GetCompleteInfo(Machine machine) + //{ + // if (string.IsNullOrEmpty(machine.code)) + // return; + // var machineName = GapRemove(machine.code); + // var simpleField = includeFields[machineName]; + // onCompleteInfo?.Invoke(machine, simpleField); + //} #endregion #region õ Ͼ /¼ diff --git a/Assets/Scripts/Manager/EventConnecter.cs b/Assets/Scripts/Manager/EventConnecter.cs index 5202fed4..bab900ca 100644 --- a/Assets/Scripts/Manager/EventConnecter.cs +++ b/Assets/Scripts/Manager/EventConnecter.cs @@ -32,7 +32,6 @@ namespace CHN var machineClickManager = FindSingle(); controller.onChangeViewMode += topCanvas.panel_toolbar.SetChangeViewButtonState; - building.onChangeFloor += viewManager.ChangeViewWithFloorControl; topCanvas.panel_toolbar.onClickCameraView += viewManager.ChangeViewWithButtonClick; topCanvas.panel_toolbar.onClickFloorControl += popupCanvas.panel_floorcontrol.SetActive; @@ -57,24 +56,24 @@ namespace CHN popupCanvas.panel_library.onClickLabelButton += libraryManager.LibraryFiltering; popupCanvas.panel_protocolsetting.onUpdateMachine += libraryManager.MatchingMachine; - popupCanvas.panel_library.onClickLibraryButton += popupCanvas.MachineDashBoardOpen; + //popupCanvas.panel_library.onClickLibraryButton += popupCanvas.MachineDashBoardOpen; popupCanvas.panel_library.onClickLibraryButton += highLightManager.ClickMachinToHighlight; popupCanvas.panel_library.onClickLibraryButton += viewManager.SetTargetPosToMachine; popupCanvas.panel_library.onClickDeleteRegistration += popupCanvas.panel_machinedeleteregistration.SetData; popupCanvas.panel_library.onClickCorrection += popupCanvas.panel_machinecorrection.SetData; - popupCanvas.simpleView += datamanager.MachineDataSetChange; - popupCanvas.onClickSimple += datamanager.GetSimpleCompleteData; - popupCanvas.onClickDetail += datamanager.GetCompleteInfo; - popupCanvas.onOpenDashboard += popupCanvas.panel_completealramhistory.Close; - popupCanvas.onCloseDashBoard += highLightManager.ResetAllHighLighter; + //popupCanvas.simpleView += datamanager.MachineDataSetChange; + //popupCanvas.onClickSimple += datamanager.GetSimpleCompleteData; + //popupCanvas.onClickDetail += datamanager.GetCompleteInfo; + //popupCanvas.onOpenDashboard += popupCanvas.panel_completealramhistory.Close; + //popupCanvas.onCloseDashBoard += highLightManager.ResetAllHighLighter; popupCanvas.panel_machinedata.onCloseDashboard += highLightManager.ResetAllHighLighter; popupCanvas.panel_completealramhistory.onClickAlram += completeTimeManager.MachineCorrespondingToAlarm; //popupCanvas.panel_completealramhistory.onCheckAlarmData += completeTimeManager.CheckCompleteTimeAlarm; //popupCanvas.panel_completealramhistory.onCheckAlarm += topCanvas.panel_toptoolbar.SetAlarmCount; - popupCanvas.panel_completealramhistory.onOpen += popupCanvas.CurrentDashoboardClose; + //popupCanvas.panel_completealramhistory.onOpen += popupCanvas.CurrentDashoboardClose; popupCanvas.panel_totalproduction.onSelected += popupCanvas.SetChangedProductionPanel; popupCanvas.panel_assemblyproduction.onSelected += popupCanvas.SetChangedProductionPanel; @@ -104,8 +103,8 @@ namespace CHN datamanager.onFinalInspectionData += popupCanvas.panel_finalinspection.SetProductionStatus; datamanager.onWorkShopInfo += popupCanvas.panel_workprogressstatus.SetWorkProgressStatus; - datamanager.onSimpleInfo += popupCanvas.SimpleView; - datamanager.onCompleteInfo += popupCanvas.DetailView; + //datamanager.onSimpleInfo += popupCanvas.SimpleView; + //datamanager.onCompleteInfo += popupCanvas.DetailView; datamanager.onKPIInfo += machineUIManager.SetMachineKPI; datamanager.onKPIInfo += popupCanvas.panel_totalproduction.SetMachineEffectiveness; datamanager.onSetThermostatData += popupCanvas.panel_thermostatcontrol.SetData; @@ -122,31 +121,30 @@ namespace CHN mqttManager.onWorkshopData += popupCanvas.panel_totalproduction.SetWorkProgressStatus; mqttManager.onThermostatData += datamanager.SetThermostatDataList; - completeTimeManager.onActiveHighLighter += popupCanvas.MachineDashBoardOpen; + //completeTimeManager.onActiveHighLighter += popupCanvas.MachineDashBoardOpen; completeTimeManager.onActiveHighLighter += highLightManager.ClickMachinToHighlight; completeTimeManager.onActiveHighLighter += viewManager.SetTargetPosToMachine; httpManager.onMachineKPIData += datamanager.UpdateKPIData; - machineUIManager.onClickKPIToMachine += popupCanvas.MachineDashBoardOpen; + //machineUIManager.onClickKPIToMachine += popupCanvas.MachineDashBoardOpen; machineUIManager.onClickKPIToMachine += highLightManager.ClickMachinToHighlight; machineUIManager.onClickKPIToData += popupCanvas.panel_machinedata.SetMachineData; machineUIManager.onClickKPIToData += popupCanvas.panel_detaildashboard.SetDetailDashBoardData; thermostatIconManager.onClickThermostatIcon += popupCanvas.panel_thermostatcontrol.SettingThermostatData; - machineClickManager.onLeftClickMachine += popupCanvas.MachineDashBoardOpen; + //machineClickManager.onLeftClickMachine += popupCanvas.MachineDashBoardOpen; machineClickManager.onLeftClickMachine += highLightManager.ClickMachinToHighlight; machineClickManager.onLeftClickArea += highLightManager.ClickArea; - optionManager.onCompletedLoadOption += popupCanvas.panel_controlsetting.InitOptionSetting; optionManager.onCompletedLoadOption += popupCanvas.panel_protocolsetting.InitOptionSetting; optionManager.LoadOption(); } private void SceneReLoad() { - controller.option.isFirstPersonView = false; + //controller.option.isFirstPersonView = false; SceneManager.LoadScene(SceneManager.GetActiveScene().name); } } diff --git a/Assets/Scripts/Manager/MachineClickManager.cs b/Assets/Scripts/Manager/MachineClickManager.cs index 347dac31..48b04b8f 100644 --- a/Assets/Scripts/Manager/MachineClickManager.cs +++ b/Assets/Scripts/Manager/MachineClickManager.cs @@ -49,13 +49,10 @@ namespace CHN return; } - if (controller.IsClickUI) - return; - LayerMask exceptionLayer = LayerMask.GetMask("Floor", "Ground"); LayerMask layerMask = floorLayers & ~exceptionLayer; - Ray ray = controller.camera.ScreenPointToRay(Input.mousePosition); + Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); hitInfo = Physics.RaycastAll(ray, Mathf.Infinity, layerMask); if (hitInfo.Length == 0) @@ -82,15 +79,10 @@ namespace CHN { bool leftClick = Input.GetMouseButtonDown(0); - if (controller.IsClickUI) - { - return; - } - LayerMask exceptionLayer = LayerMask.GetMask("Machine"); LayerMask layerMask = floorLayers & ~exceptionLayer; - var ray = controller.camera.ScreenPointToRay(Input.mousePosition); + var ray = Camera.main.ScreenPointToRay(Input.mousePosition); hitInfo = Physics.RaycastAll(ray, Mathf.Infinity, layerMask); if (hitInfo.Length == 0) diff --git a/Assets/Scripts/Manager/MachineUIManager.cs b/Assets/Scripts/Manager/MachineUIManager.cs index e9c26fdb..35e1fd1c 100644 --- a/Assets/Scripts/Manager/MachineUIManager.cs +++ b/Assets/Scripts/Manager/MachineUIManager.cs @@ -34,19 +34,19 @@ namespace CHN [Range(0.1f, 2f)] public float scaleClamp; private List activeUIElements = new(); - private Vector3[] worldCorners = new Vector3[4]; // : GC ̸ Ҵ + private Vector3[] worldCorners = new Vector3[4]; // ��������: GC ������ �̸� �Ҵ� private void Start() { - cam = FindSingle(); // : Start ȣϿ ij + cam = FindSingle(); // ��������: Start���� �� ���� ȣ���Ͽ� ij�� building = FindSingle(); - // ֱ ſ ( X) + // �ֱ������� ���ſ� ������ ���� (�� ������ X) StartCoroutine(UpdateLoop()); } private System.Collections.IEnumerator UpdateLoop() { - var wait = new WaitForSeconds(updateInterval); // : ϴ updateInterval ϵ + var wait = new WaitForSeconds(updateInterval); // ��������: �� ������ �����ϴ� ������ updateInterval���� �����ϵ��� ���� while (true) { Profiler.BeginSample("MachineKPI_TotalUpdate"); @@ -56,14 +56,14 @@ namespace CHN GroupOverlappingUIElements(); } Profiler.EndSample(); - yield return wait; // : ۿ ѹ Ͽ ijص -> ޸ Ҵ 0 + yield return wait; // ��������: ���� �ۿ��� �� �ѹ� �����Ͽ� ij���ص� ���� ���� -> �޸� �Ҵ� 0 } } #region Machine public void SetMachineKPI(List machineData) { - prefab_MachineKPI = Resources.Load("Prefabs/UI/PRF_UI_MachineKPI"); + prefab_MachineKPI = Resources.Load("UI/Prefabs/PRF_UI_MachineKPI"); machines = building.floors.SelectMany(f => f.machines).ToArray(); Clear(); @@ -99,9 +99,9 @@ namespace CHN private void UpdateMachineVisibilityAndScale() { - // : RangeDetection Լ -> ڷƾ ȿ Ǵ ü Ʈ + // ��������: ���� RangeDetection �Լ� -> �ڷ�ƾ �ȿ��� ����Ǵ� ���ü� ������Ʈ ������ ���� int layerMask = LayerMask.GetMask("Camera", "Floor Wall"); - float t = Mathf.InverseLerp(cam.option.maxDistance, 0f, cam.option.currentDistance); + float t = Mathf.InverseLerp(cam.maxDistance, 0f, cam.currentDistance); float scaleValue = Mathf.Lerp(minScale, maxScale, t); Vector3 newScale = new Vector3(scaleValue, scaleValue, scaleValue); @@ -116,8 +116,8 @@ namespace CHN { machine.machineKPI.Active(); machine.machineKPI.transform.localScale = newScale; - // ǥ ũ ǥ ȯϿ 1 ġ - Vector3 screenPos = cam.camera.WorldToScreenPoint(machine.centerPos + Vector3.up * defaultNameHeight); + // ���� ��ǥ�� ��ũ�� ��ǥ�� ��ȯ�Ͽ� 1�� ��ġ + Vector3 screenPos = Camera.main.WorldToScreenPoint(machine.centerPos + Vector3.up * defaultNameHeight); machine.machineKPI.transform.position = screenPos; activeUIElements.Add(machine.machineKPI.rectTransform); } @@ -130,17 +130,17 @@ namespace CHN private bool IsMachineVisible(Machine machine, Floor currentFloor, int layerMask) { - // : -> ٷ ϵ ( ) + // ��������: ���� ������ ������� ���� -> ���� �� �ٷ� �����ϵ��� (���� ����) - // ˻ ( MachineKPIsActive Լ) + // �� �˻� (���� MachineKPIsActive �Լ�) if (machine.GetComponentInParent() != currentFloor) return false; - // ȭ ȿ ִ ˻ ( IsScreenRange Լ) - Vector3 viewPos = cam.camera.WorldToViewportPoint(machine.centerPos); + // ȭ�� �ȿ� �ִ��� �˻� (���� IsScreenRange �Լ�) + Vector3 viewPos = Camera.main.WorldToViewportPoint(machine.centerPos); if (!(viewPos.x >= 0 && viewPos.x <= 1 && viewPos.y >= 0 && viewPos.y <= 1 && viewPos.z > 0)) return false; - // ijƮ ( MachineKPIsActive Լ) - Vector3 dir = cam.camera.transform.position - machine.centerPos; + // ����ij��Ʈ (���� MachineKPIsActive �Լ�) + Vector3 dir = Camera.main.transform.position - machine.centerPos; if (Physics.Raycast(machine.centerPos, dir, out RaycastHit hit, Mathf.Infinity, layerMask)) { return hit.collider.gameObject.layer == LayerMask.NameToLayer("Camera"); @@ -154,11 +154,11 @@ namespace CHN { if (activeUIElements.Count == 0) return; - // : uncheckedElements.Where(...) Ҵ -> ׷ - // : Yǥ Ͽ Ʒ (LINQ List.Sort Ҵ ) + // ��������: uncheckedElements.Where(...) ���� �Ҵ� ���� ���� -> ������ �׷� ��� ���� ���� + // ����: Y��ǥ �������� �����Ͽ� �Ʒ������� ���� (LINQ ��� List.Sort�� �Ҵ� ����) activeUIElements.Sort((a, b) => a.position.y.CompareTo(b.position.y)); - // ܼȭ ø (׸峪 ׷ üũ) + // �ܼ�ȭ�� ��ø ���� ���� (�׸��峪 �׷��� ��� ������ üũ) for (int i = 0; i < activeUIElements.Count; i++) { for (int j = i + 1; j < activeUIElements.Count; j++) @@ -168,7 +168,7 @@ namespace CHN if (AreRectsOverlapping(rectA, rectB)) { - // ġ B A ø + // ��ġ�� B�� A ���� �ø� float offset = rectA.rect.height * rectA.lossyScale.y; rectB.position = new Vector3(rectB.position.x, rectA.position.y + offset, rectB.position.z); } @@ -181,7 +181,7 @@ namespace CHN } private Rect GetWorldRect(RectTransform rectTransform) { - rectTransform.GetWorldCorners(worldCorners); // : worldCorners ij -> GetWorldRect ȣ ø ߻ϴ 迭 + rectTransform.GetWorldCorners(worldCorners); // ��������: worldCorners�� ��� ������ ij�� -> GetWorldRect ȣ�� �ø��� �߻��ϴ� �迭 ���� ���� return new Rect(worldCorners[0], worldCorners[2] - worldCorners[0]); } diff --git a/Assets/Scripts/Manager/ViewManager.cs b/Assets/Scripts/Manager/ViewManager.cs index a46ea3af..e09b0d76 100644 --- a/Assets/Scripts/Manager/ViewManager.cs +++ b/Assets/Scripts/Manager/ViewManager.cs @@ -20,10 +20,6 @@ public class ViewManager : MonoBehaviour, ISingle public void ChangeViewWithButtonClick(ViewMode mode) { preViewMode = controller.viewMode; - var preViewModeData = new CameraEntity(); - preViewModeData.distance = controller.option.currentDistance; - preViewModeData.azimuth = controller.option.currentAzimuth; - preViewModeData.elevation = controller.option.currentElevation; controller.SetViewMode(mode); @@ -36,86 +32,18 @@ public class ViewManager : MonoBehaviour, ISingle case ViewMode.TopView: SetTopView(); break; - - case ViewMode.FirstPersonView: - SetFirstPersonView(preViewMode, preViewModeData); - break; } - controller.LastPositioning(true); + controller.LastPositioning(); } private void SetPerPerspectiveView() { - if(controller.saveTargetPositions[ViewMode.PerspectiveView] == null) - { - var perspectivePos = controller.option.target.position; - var newPos = new Vector3(perspectivePos.x, building.currentFloor.StartPoint.position.y, perspectivePos.z); - controller.nextPosition = newPos; - - building.SetAllFloorExternalState(); - } - else - { - building.SetAllFloorExternalState(); - - var floorIndex = controller.saveTargetPositions[ViewMode.PerspectiveView].floorIndex; - var slider = FindSingle().panel_floorcontrol; - slider.ChangeValueFromOutside(floorIndex); - } + controller.SetViewMode(ViewMode.PerspectiveView); + building.SetAllFloorExternalState(); } private void SetTopView() { - if (controller.saveTargetPositions[ViewMode.TopView] == null) - { - var pos = controller.nextPosition; - pos.y = building.currentFloor.StartPoint.position.y; - - controller.nextPosition = pos; - building.SetAllFloorExternalState(); - } - else - { - building.SetAllFloorExternalState(); - - var floorIndex = controller.saveTargetPositions[ViewMode.TopView].floorIndex; - var slider = FindSingle().panel_floorcontrol; - slider.ChangeValueFromOutside(floorIndex); - } - } - private void SetFirstPersonView(ViewMode preViewMode, CameraEntity preViewModeData) - { - if (building.currentFloor.isEmptyFloor) - { - controller.SetViewMode(preViewMode); - controller.option.currentDistance = preViewModeData.distance; - controller.option.currentAzimuth = preViewModeData.azimuth; - controller.option.currentElevation = preViewModeData.elevation; - - return; - } - if (controller.saveTargetPositions[ViewMode.FirstPersonView] == null) - { - building.SetCurrentFloorInternalState(); - - var pos = controller.option.target.position; - var startPoint = building.currentFloor.StartPoint.transform; - - if (building.currentFloor.FloorContainsPoint(pos)) - { - var tourModePos = new Vector3(pos.x, startPoint.position.y, pos.z); - startPoint.position = tourModePos; - } - controller.nextPosition = startPoint.position; - - CheckHitWall(); - } - else - { - building.SetCurrentFloorInternalState(); - - var floorIndex = controller.saveTargetPositions[ViewMode.FirstPersonView].floorIndex; - var slider = FindSingle().panel_floorcontrol; - slider.ChangeValueFromOutside(floorIndex); - } + controller.SetViewMode(ViewMode.TopView); + building.SetAllFloorExternalState(); } public void SetTargetPosToMachine(Machine machine) @@ -139,73 +67,9 @@ public class ViewManager : MonoBehaviour, ISingle var slider = FindSingle().panel_floorcontrol; slider.ChangeValueFromOutside(changeFloor); - controller.option.currentAzimuth = machine.focusAzimuth; - controller.option.currentElevation = machine.focusElevation; - controller.option.currentDistance = machine.focusDistance; + controller.currentAzimuth = machine.focusAzimuth; + controller.currentElevation = machine.focusElevation; + controller.currentDistance = machine.focusDistance; controller.SetTargetPos(centerPos); } - - public void ChangeViewWithFloorControl(Floor currentFloor, Vector3 pos) - { - if (currentFloor.isEmptyFloor) - { - if (controller.viewMode.Equals(ViewMode.FirstPersonView)) - { - controller.SetViewMode(ViewMode.PerspectiveView); - } - } - else - { - if (!currentFloor.FloorContainsPoint(controller.option.target.position)) - { - if (controller.viewMode.Equals(ViewMode.FirstPersonView)) - { - controller.nextPosition = building.currentFloor.StartPoint.position; - } - } - } - - building.SetAllFloorExternalState(); - - if (!controller.option.isFirstPersonView) - return; - - currentFloor.SetInternalState(); - controller.LastPositioning(true); - } - private void CheckHitWall() - { - var targetPosition = controller.option.target.position; - - if (!IsPositionBlocked(targetPosition)) - return; - - Vector3[] directions = { Vector3.forward, Vector3.back, Vector3.left, Vector3.right }; - var foundFreeSpot = false; - - for (int attempt = 0; attempt < maxPushAttempts && !foundFreeSpot; attempt++) - { - foreach (var dir in directions) - { - var candidatePos = targetPosition + dir * pushOutDistance * attempt; - if (!IsPositionBlocked(candidatePos)) - { - targetPosition = candidatePos; - foundFreeSpot = true; - break; - } - } - } - - if (!foundFreeSpot) - { - targetPosition = building.currentFloor.StartPoint.position; - } - - controller.nextPosition = targetPosition; - } - bool IsPositionBlocked(Vector3 position) - { - return Physics.CheckSphere(position, checkRadius, wallLayer); - } } diff --git a/Assets/Scripts/Object/Building.cs b/Assets/Scripts/Object/Building.cs index 88c66872..31b68068 100644 --- a/Assets/Scripts/Object/Building.cs +++ b/Assets/Scripts/Object/Building.cs @@ -28,7 +28,6 @@ namespace CHN SetAllFloorExternalState(); } - public void SetTopFloor(int index) { for (int i = 0; i < floors.Count; ++i) @@ -39,11 +38,9 @@ namespace CHN currentFloor = floors[index]; - var pos = controller.option.target.position; + var pos = controller.cameraPivot.transform.position; pos.y = currentFloor.StartPoint.position.y; controller.SetTargetPos(pos); - - onChangeFloor?.Invoke(currentFloor, pos); } public Floor GetFloor(int index) @@ -65,42 +62,10 @@ namespace CHN { floor.SetExternalState(); } - currentFloor.TopSurfaces.SetActive(true); - } - public void ActiveBuliding() - { - foreach(var floor in floors) + if (currentFloor.TopSurfaces != null) { - floor.ActiveFloor(); - } - } - public void DeactiveBuliding() - { - foreach (var floor in floors) - { - floor.DeactiveFloor(); - } - } - public void SetActiveWalls(bool isOn) - { - foreach (var floor in floors) - { - floor.SetActiveWall(isOn); - } - } - public void SetActiveGrounds(bool isOn) - { - foreach (var floor in floors) - { - floor.SetActiveGround(isOn); - } - } - public void SetActiveDecos(bool isOn) - { - foreach (var floor in floors) - { - floor.SetActiveDeco(isOn); + currentFloor.TopSurfaces.SetActive(true); } } } diff --git a/Assets/Scripts/Object/Floor.cs b/Assets/Scripts/Object/Floor.cs index 0cda6f58..d03c716a 100644 --- a/Assets/Scripts/Object/Floor.cs +++ b/Assets/Scripts/Object/Floor.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using WI; namespace CHN { @@ -20,11 +21,14 @@ namespace CHN public GameObject FloorGroundCollider; public GameObject Ceiling; - private void Start() + private void Awake() { if(StartPoint == null) { - StartPoint.transform.position = new Vector3(1, 1, 1); + StartPoint = new GameObject(nameof(StartPoint)).transform; + StartPoint.SetParent(transform); + + StartPoint.transform.position = transform.GetMeshGroupCenter(); } } @@ -50,58 +54,28 @@ namespace CHN public void SetInternalState() { if(Ceiling == null) - { return; - } Ceiling.SetActive(true); + + if (TopSurfaces == null) + return; + TopSurfaces.SetActive(false); } public void SetExternalState() { - if(TopSurfaces == null) - { + if (TopSurfaces == null) return; - } TopSurfaces.SetActive(false); + + if (Ceiling == null) + return; + Ceiling.SetActive(false); } - - public void ActiveFloor() - { - SetActiveWall(true); - SetActiveGround(true); - SetActiveDeco(true); - } - public void DeactiveFloor() - { - SetActiveWall(false); - SetActiveGround(false); - SetActiveDeco(false); - } - public void SetActiveWall(bool isOn) - { - if (Walls == null) - return; - - Walls.SetActive(isOn); - } - public void SetActiveGround(bool isOn) - { - if (Grounds == null) - return; - - Grounds.SetActive(isOn); - } - public void SetActiveDeco(bool isOn) - { - if (Decos == null) - return; - - Decos.SetActive(isOn); - } } } diff --git a/Assets/Scripts/Object/Machine.cs b/Assets/Scripts/Object/Machine.cs index ed9ae3a0..de98f105 100644 --- a/Assets/Scripts/Object/Machine.cs +++ b/Assets/Scripts/Object/Machine.cs @@ -70,10 +70,16 @@ namespace CHN public void ActiveHighLighter() { + if (highLighter == null) + return; + highLighter.gameObject.SetActive(true); } public void DeactiveHighLighter() { + if (highLighter == null) + return; + highLighter.gameObject.SetActive(false); } diff --git a/Assets/Scripts/UI/Canvas_Popup.cs b/Assets/Scripts/UI/Canvas_Popup.cs index def130a4..196ccb1a 100644 --- a/Assets/Scripts/UI/Canvas_Popup.cs +++ b/Assets/Scripts/UI/Canvas_Popup.cs @@ -34,41 +34,41 @@ namespace CHN //public Panel_MachineDashBoard panel_machinedashboard; public RectTransform dashboardPoint; - private Dictionary machineDashboardTable = new(); + //private Dictionary machineDashboardTable = new(); - public Action onClickSimple; - public Action onClickDetail; - public Action> simpleView; - public Action onCloseDashBoard; + //public Action onClickSimple; + //public Action onClickDetail; + //public Action> simpleView; + //public Action onCloseDashBoard; - public Panel_MachineDashBoard currentDashBoard; - public Action onOpenDashboard; + //public Panel_MachineDashBoard currentDashBoard; + //public Action onOpenDashboard; - public bool isSimpleDashboardAcitve; + //public bool isSimpleDashboardAcitve; - public void ActiveSimpleDashBoard() - { - isSimpleDashboardAcitve = true; - } - public void DeactiveSimpleDashBoard() - { - isSimpleDashboardAcitve = false; - } + //public void ActiveSimpleDashBoard() + //{ + // isSimpleDashboardAcitve = true; + //} + //public void DeactiveSimpleDashBoard() + //{ + // isSimpleDashboardAcitve = false; + //} public override void AfterAwake() { - var asset = Resources.Load("Prefabs/UI/PRF_Panel_MachineDashBoard"); - var machines = FindObjectsByType(FindObjectsSortMode.None); - foreach (var machine in machines) - { - var dashboard = Instantiate(asset, transform); - dashboard.Close(); - dashboard.simpleView += simpleView; - machineDashboardTable.Add(machine, dashboard); - dashboard.onClickSimple += onClickSimple; - dashboard.onClickDetail += onClickDetail; - dashboard.onClose += onCloseDashBoard; - } + //var asset = Resources.Load("Prefabs/UI/PRF_Panel_MachineDashBoard"); + //var machines = FindObjectsByType(FindObjectsSortMode.None); + //foreach (var machine in machines) + //{ + // var dashboard = Instantiate(asset, transform); + // dashboard.Close(); + // dashboard.simpleView += simpleView; + // machineDashboardTable.Add(machine, dashboard); + // dashboard.onClickSimple += onClickSimple; + // dashboard.onClickDetail += onClickDetail; + // dashboard.onClose += onCloseDashBoard; + //} productionPanels.Add(panel_assemblyproduction); productionPanels.Add(panel_injectionproduction); productionPanels.Add(panel_workprogressstatus); @@ -79,47 +79,46 @@ namespace CHN popupPanels.RemoveAll(item => productionPanels.Contains(item as IDashboardUI)); } - public void MachineDashBoardOpen(Machine clickMachine) - { - if (!isSimpleDashboardAcitve) - return; + //public void MachineDashBoardOpen(Machine clickMachine) + //{ + // if (!isSimpleDashboardAcitve) + // return; - if (currentDashBoard != null) - { - currentDashBoard.SetActive(false); - } - currentDashBoard = machineDashboardTable[clickMachine]; - currentDashBoard.OpenFromMachine(clickMachine); + // if (currentDashBoard != null) + // { + // currentDashBoard.SetActive(false); + // } + // currentDashBoard = machineDashboardTable[clickMachine]; + // currentDashBoard.OpenFromMachine(clickMachine); - SetDashBoardPosition(); - onOpenDashboard?.Invoke(); - } + // SetDashBoardPosition(); + // onOpenDashboard?.Invoke(); + //} - public void SimpleView(Machine machine, MachineDataSet data) - { - machineDashboardTable[machine].SimpleInfoView(data); - } + //public void SimpleView(Machine machine, MachineDataSet data) + //{ + // machineDashboardTable[machine].SimpleInfoView(data); + //} - public void DetailView(Machine machine, MachineDataSet data) - { - machineDashboardTable[machine].DetailInfoView(machine, data); - } + //public void DetailView(Machine machine, MachineDataSet data) + //{ + // machineDashboardTable[machine].DetailInfoView(machine, data); + //} - public void CurrentDashoboardClose() - { - if (currentDashBoard != null) - { - currentDashBoard.Clear(); - currentDashBoard.SetActive(false); - } - } - public void SetDashBoardPosition() - { - currentDashBoard.transform.position = dashboardPoint.transform.position; - currentDashBoard.transform.SetAsLastSibling(); - } + //public void CurrentDashoboardClose() + //{ + // if (currentDashBoard != null) + // { + // currentDashBoard.Clear(); + // currentDashBoard.SetActive(false); + // } + //} + //public void SetDashBoardPosition() + //{ + // currentDashBoard.transform.position = dashboardPoint.transform.position; + // currentDashBoard.transform.SetAsLastSibling(); + //} - public Panel_ControlSetting panel_controlsetting; public Panel_ProtocolSetting panel_protocolsetting; public void SetChangedProductionPanel(PanelBase newPanel) diff --git a/Assets/Scripts/UI/Panel_CompleteAlramHistory.cs b/Assets/Scripts/UI/Panel_CompleteAlramHistory.cs index 5c2b87b9..0094107f 100644 --- a/Assets/Scripts/UI/Panel_CompleteAlramHistory.cs +++ b/Assets/Scripts/UI/Panel_CompleteAlramHistory.cs @@ -26,7 +26,7 @@ namespace CHN public override void AfterAwake() { - prefab_completeTimeAlarmInfo = Resources.Load("Prefabs/UI/PRF_UI_CompleteTimeAlramInfo"); + prefab_completeTimeAlarmInfo = Resources.Load("UI/Prefabs/PRF_UI_CompleteTimeAlramInfo"); Button_Close.onClick.AddListener(Close); notCheckAlramList.Clear(); completeInfoList.Clear(); diff --git a/Assets/Scripts/UI/Panel_DetailDashBoard.cs b/Assets/Scripts/UI/Panel_DetailDashBoard.cs index f25ad0b6..c34cad16 100644 --- a/Assets/Scripts/UI/Panel_DetailDashBoard.cs +++ b/Assets/Scripts/UI/Panel_DetailDashBoard.cs @@ -68,8 +68,8 @@ public class Panel_DetailDashBoard : PanelBase public void SetDetailDashBoardData(MachineDataSet data, Machine machine) { var canvas_popup = FindSingle(); - if (canvas_popup.isSimpleDashboardAcitve) - return; + //if (canvas_popup.isSimpleDashboardAcitve) + // return; SetTextData(data, machine); SetSliderData(data); diff --git a/Assets/Scripts/UI/Panel_FloorControl.cs b/Assets/Scripts/UI/Panel_FloorControl.cs index f1524732..498c8b80 100644 --- a/Assets/Scripts/UI/Panel_FloorControl.cs +++ b/Assets/Scripts/UI/Panel_FloorControl.cs @@ -18,7 +18,7 @@ namespace CHN public override void AfterStart() { - prefab_floorButton = Resources.Load("Prefabs/UI/PRF_UI_FloorButton"); + prefab_floorButton = Resources.Load("UI/Prefabs/PRF_UI_FloorButton"); SettingButtons(5); SetActive(false); } diff --git a/Assets/Scripts/UI/Panel_Library.cs b/Assets/Scripts/UI/Panel_Library.cs index 8130fc52..53e08d57 100644 --- a/Assets/Scripts/UI/Panel_Library.cs +++ b/Assets/Scripts/UI/Panel_Library.cs @@ -44,8 +44,8 @@ namespace CHN public override void AfterAwake() { dataOrder = Resources.Load("DataOrder").text; - prf_LibraryButton = Resources.Load("Prefabs/UI/PRF_UI_LibraryButton"); - prf_FilterToggle = Resources.Load("Prefabs/UI/PRF_UI_FilterButton"); + prf_LibraryButton = Resources.Load("UI/Prefabs/PRF_UI_LibraryButton"); + prf_FilterToggle = Resources.Load("UI/Prefabs/PRF_UI_FilterButton"); Button_Active.onClick.AddListener(OnClickActiveButton); originPos = rectTransform.anchoredPosition; diff --git a/Assets/Scripts/UI/Panel_MachineDashBoard.cs b/Assets/Scripts/UI/Panel_MachineDashBoard.cs index 8240933a..56f25202 100644 --- a/Assets/Scripts/UI/Panel_MachineDashBoard.cs +++ b/Assets/Scripts/UI/Panel_MachineDashBoard.cs @@ -42,7 +42,7 @@ namespace CHN private Button currentTabButton; public override void AfterAwake() { - prf_InfoItem = Resources.Load("Prefabs/UI/PRF_UI_MachineInfoItem"); + prf_InfoItem = Resources.Load("UI/Prefabs/PRF_UI_MachineInfoItem"); Button_Close.onClick.AddListener(Close); Button_Simple.onClick.AddListener(OnClickSimple); Button_Detail.onClick.AddListener(OnClickDetail); diff --git a/Assets/Scripts/UI/Panel_TopToolBar.cs b/Assets/Scripts/UI/Panel_TopToolBar.cs index 653510e7..36d2e1b5 100644 --- a/Assets/Scripts/UI/Panel_TopToolBar.cs +++ b/Assets/Scripts/UI/Panel_TopToolBar.cs @@ -15,8 +15,6 @@ namespace CHN public Button Button_ProductionProgress; public Button Button_AssemblyProgress; public Button Button_FinalInspection; - public Button Button_AssemblyProgressLine; - public Button Button_MoldDepartment; public Button Button_Alrams; public Button Button_Setting; public Button Button_Exit; @@ -27,8 +25,6 @@ namespace CHN public Action onClickProductionProgress; public Action onClickAssemblyProgress; public Action onClickFinalInspection; - public Action onClickAssemblyProgressLine; - public Action onClickMoldDepartment; public Action onClickAlarms; public Action onClickSetting; public Action onClickExit; @@ -47,8 +43,6 @@ namespace CHN Button_ProductionProgress.onClick.AddListener(OnClickProductionProgress); Button_AssemblyProgress.onClick.AddListener(OnClickAssemblyProgress); Button_FinalInspection.onClick.AddListener(OnClickFinalInspection); - Button_AssemblyProgressLine.onClick.AddListener(OnClickAssemblyProgressLine); - Button_MoldDepartment.onClick.AddListener(OnClickMoldDepartment); Button_Alrams.onClick.AddListener(OnClickAlrams); Button_Setting.onClick.AddListener(OnClickSetting); Button_Exit.onClick.AddListener(OnClickExit); @@ -104,20 +98,6 @@ namespace CHN onClickFinalInspection?.Invoke(); } - private void OnClickAssemblyProgressLine() - { - if (isClickable) - return; - - onClickAssemblyProgressLine?.Invoke(); - } - private void OnClickMoldDepartment() - { - if (isClickable) - return; - - onClickMoldDepartment?.Invoke(); - } private void OnClickAlrams() { if (isClickable) diff --git a/Assets/Scripts/UI/Panel_TotalProduction.cs b/Assets/Scripts/UI/Panel_TotalProduction.cs index 0154d014..3ab0b3d3 100644 --- a/Assets/Scripts/UI/Panel_TotalProduction.cs +++ b/Assets/Scripts/UI/Panel_TotalProduction.cs @@ -60,8 +60,8 @@ public class Panel_TotalProduction : PanelBase, IDashboardUI public override void AfterAwake() { - prf_statusContent = Resources.Load("Prefabs/UI/PRF_UI_MachineStatusContent"); - prf_effectivenessContent = Resources.Load("Prefabs/UI/PRF_UI_MachineEffectivenessContent"); + prf_statusContent = Resources.Load("UI/Prefabs/PRF_UI_MachineStatusContent"); + prf_effectivenessContent = Resources.Load("UI/Prefabs/PRF_UI_MachineEffectivenessContent"); WorkProgressContent = transform.GetComponentInChildren(true); effect = FindSingle(); Button_Close.onClick.AddListener(OnClickCloseButton); diff --git a/Assets/Scripts/UI/UI_MachineEffectivenessContent.cs b/Assets/Scripts/UI/UI_MachineEffectivenessContent.cs index 7a0ef6ad..0f528a34 100644 --- a/Assets/Scripts/UI/UI_MachineEffectivenessContent.cs +++ b/Assets/Scripts/UI/UI_MachineEffectivenessContent.cs @@ -13,7 +13,7 @@ public class UI_MachineEffectivenessContent : UIBase public override void AfterAwake() { - prf_machineEffectiveness = Resources.Load("Prefabs/UI/PRF_UI_MachineEffectivenessItem"); + prf_machineEffectiveness = Resources.Load("UI/Prefabs/PRF_UI_MachineEffectivenessItem"); } public void SetProductionStatusItem(List machineDataSets, MachineType type) diff --git a/Assets/Scripts/UI/UI_MachineStatusContent.cs b/Assets/Scripts/UI/UI_MachineStatusContent.cs index c68b5947..efd6dc13 100644 --- a/Assets/Scripts/UI/UI_MachineStatusContent.cs +++ b/Assets/Scripts/UI/UI_MachineStatusContent.cs @@ -11,7 +11,7 @@ public class UI_MachineStatusContent : UIBase public override void AfterAwake() { - prf_machineStatus = Resources.Load("Prefabs/UI/PRF_UI_MachineStatusItem"); + prf_machineStatus = Resources.Load("UI/Prefabs/PRF_UI_MachineStatusItem"); } public void SetProductionStatusItem(List machineInfos, MachineType type) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 7d2c6a37..002ca637 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -927,7 +927,7 @@ PlayerSettings: qnxGraphicConfPath: apiCompatibilityLevel: 3 captureStartupLogs: {} - activeInputHandler: 1 + activeInputHandler: 2 windowsGamepadBackendHint: 0 cloudProjectId: 8c7e7d7c-2455-4864-ae12-b89709ce93db framebufferDepthMemorylessMode: 0