From 99deee5ab66ea300cc15411f2dad8fcbb60ac0c6 Mon Sep 17 00:00:00 2001 From: xpeng <1216772231@qq.com> Date: Mon, 3 Oct 2022 22:48:09 +0200 Subject: [PATCH] add IPC touch support and fix some issue --- Assets/Material/Room/Floor.mat | 4 +- Assets/Prefab/CheckBoxText.prefab | 30 ++++- Assets/Prefab/DropdownText.prefab | 30 ++++- Assets/Prefab/SliderText.prefab | 30 ++++- Assets/Prefab/ValueText.prefab | 56 ++++++++- Assets/Scenes/WACVR.unity | 112 ++++++++++++++---- Assets/Script/IPCManager.meta | 8 ++ Assets/Script/IPCManager/IPCManager.asmdef | 3 + .../Script/IPCManager/IPCManager.asmdef.meta | 7 ++ Assets/Script/IPCManager/IPCManager.cs | 67 +++++++++++ .../IPCManager.cs.meta} | 2 +- .../Script/LightManager/LightManager.asmdef | 3 +- Assets/Script/LightManager/LightManager.cs | 48 +++----- .../Script/{Serial.meta => TouchManager.meta} | 0 .../ColliderToTouch.cs} | 6 +- .../ColliderToTouch.cs.meta} | 0 .../TouchManager.asmdef} | 3 +- .../TouchManager.asmdef.meta} | 0 .../TouchManager.cs} | 22 ++-- .../Script/TouchManager/TouchManager.cs.meta | 11 ++ Assets/Texture/Card.png.meta | 27 ++++- Assets/Texture/WoodFloor007_1K_Color.jpg.meta | 27 ++++- .../Texture/WoodFloor007_1K_NormalDX.jpg.meta | 27 ++++- .../WoodFloor007_1K_Roughness.jpg.meta | 27 ++++- Assets/Texture/locked.png.meta | 27 ++++- Assets/Texture/unlocked.png.meta | 27 ++++- ProjectSettings/TagManager.asset | 2 +- mercuryio/mercuryio.c | 4 +- 28 files changed, 523 insertions(+), 87 deletions(-) create mode 100644 Assets/Script/IPCManager.meta create mode 100644 Assets/Script/IPCManager/IPCManager.asmdef create mode 100644 Assets/Script/IPCManager/IPCManager.asmdef.meta create mode 100644 Assets/Script/IPCManager/IPCManager.cs rename Assets/Script/{Serial/Serial.cs.meta => IPCManager/IPCManager.cs.meta} (83%) rename Assets/Script/{Serial.meta => TouchManager.meta} (100%) rename Assets/Script/{Serial/ColliderToSerial.cs => TouchManager/ColliderToTouch.cs} (86%) rename Assets/Script/{Serial/ColliderToSerial.cs.meta => TouchManager/ColliderToTouch.cs.meta} (100%) rename Assets/Script/{Serial/Serial.asmdef => TouchManager/TouchManager.asmdef} (78%) rename Assets/Script/{Serial/Serial.asmdef.meta => TouchManager/TouchManager.asmdef.meta} (100%) rename Assets/Script/{Serial/Serial.cs => TouchManager/TouchManager.cs} (95%) create mode 100644 Assets/Script/TouchManager/TouchManager.cs.meta diff --git a/Assets/Material/Room/Floor.mat b/Assets/Material/Room/Floor.mat index db6d8e3..8ce4ef6 100644 --- a/Assets/Material/Room/Floor.mat +++ b/Assets/Material/Room/Floor.mat @@ -84,7 +84,7 @@ Material: m_Floats: - _AlphaClip: 0 - _Blend: 0 - - _BumpScale: 1 + - _BumpScale: 2 - _ClearCoatMask: 0 - _ClearCoatSmoothness: 0 - _Cull: 2 @@ -102,7 +102,7 @@ Material: - _Parallax: 0.02 - _QueueOffset: 0 - _ReceiveShadows: 1 - - _Smoothness: 0.102 + - _Smoothness: 0.247 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 diff --git a/Assets/Prefab/CheckBoxText.prefab b/Assets/Prefab/CheckBoxText.prefab index 8cb89b6..bc38036 100644 --- a/Assets/Prefab/CheckBoxText.prefab +++ b/Assets/Prefab/CheckBoxText.prefab @@ -164,7 +164,8 @@ GameObject: - component: {fileID: 4545477537435998766} - component: {fileID: 4914134492775180718} - component: {fileID: 840120427923841567} - m_Layer: 5 + - component: {fileID: 879543074018993664} + m_Layer: 7 m_Name: CheckBoxText m_TagString: Untagged m_Icon: {fileID: 0} @@ -284,12 +285,24 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 18.424858} + m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!225 &879543074018993664 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644598695143456032} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 --- !u!1 &5797589906357710865 GameObject: m_ObjectHideFlags: 0 @@ -300,6 +313,7 @@ GameObject: m_Component: - component: {fileID: 6752826324813969372} - component: {fileID: 5266744100940582161} + - component: {fileID: 907000828593675063} m_Layer: 5 m_Name: Toggle m_TagString: Untagged @@ -376,3 +390,15 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_IsOn: 1 +--- !u!225 &907000828593675063 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5797589906357710865} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 diff --git a/Assets/Prefab/DropdownText.prefab b/Assets/Prefab/DropdownText.prefab index 7cf7dc9..8a055a7 100644 --- a/Assets/Prefab/DropdownText.prefab +++ b/Assets/Prefab/DropdownText.prefab @@ -11,7 +11,8 @@ GameObject: - component: {fileID: 4545477537435998766} - component: {fileID: 4914134492775180718} - component: {fileID: 840120427923841567} - m_Layer: 5 + - component: {fileID: 997211777649122344} + m_Layer: 7 m_Name: DropdownText m_TagString: Untagged m_Icon: {fileID: 0} @@ -131,12 +132,24 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 18.424858} + m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!225 &997211777649122344 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644598695143456032} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 --- !u!1 &6563380805594740093 GameObject: m_ObjectHideFlags: 0 @@ -1063,6 +1076,7 @@ GameObject: - component: {fileID: 6563380807134184745} - component: {fileID: 6563380807134184742} - component: {fileID: 6563380807134184743} + - component: {fileID: 6673326241402848025} m_Layer: 5 m_Name: Dropdown m_TagString: Untagged @@ -1195,6 +1209,18 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_AlphaFadeSpeed: 0.15 +--- !u!225 &6673326241402848025 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6563380807134184741} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 --- !u!1 &6563380807346052300 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefab/SliderText.prefab b/Assets/Prefab/SliderText.prefab index dbaab1b..666e8f3 100644 --- a/Assets/Prefab/SliderText.prefab +++ b/Assets/Prefab/SliderText.prefab @@ -47,6 +47,7 @@ GameObject: m_Component: - component: {fileID: 4821294829281819036} - component: {fileID: 4034806853489518429} + - component: {fileID: 485274077402689608} m_Layer: 5 m_Name: Slider m_TagString: Untagged @@ -128,6 +129,18 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!225 &485274077402689608 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 953721974989367623} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 --- !u!1 &3499886009287098783 GameObject: m_ObjectHideFlags: 0 @@ -328,7 +341,8 @@ GameObject: - component: {fileID: 4545477537435998766} - component: {fileID: 4914134492775180718} - component: {fileID: 840120427923841567} - m_Layer: 5 + - component: {fileID: 8939025946289994825} + m_Layer: 7 m_Name: SliderText m_TagString: Untagged m_Icon: {fileID: 0} @@ -448,12 +462,24 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 18.424858} + m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!225 &8939025946289994825 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644598695143456032} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 --- !u!1 &7399021800224349206 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefab/ValueText.prefab b/Assets/Prefab/ValueText.prefab index bbe11ba..9e3ba21 100644 --- a/Assets/Prefab/ValueText.prefab +++ b/Assets/Prefab/ValueText.prefab @@ -11,7 +11,8 @@ GameObject: - component: {fileID: 1934694025795579377} - component: {fileID: 714536851426110238} - component: {fileID: 961628899725507573} - m_Layer: 5 + - component: {fileID: 5570847698151040595} + m_Layer: 7 m_Name: ValueText m_TagString: Untagged m_Icon: {fileID: 0} @@ -140,6 +141,18 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!225 &5570847698151040595 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 685421208154548134} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 --- !u!1 &4618003684357954260 GameObject: m_ObjectHideFlags: 0 @@ -561,6 +574,7 @@ GameObject: - component: {fileID: 7295078377801303286} - component: {fileID: 7295078377801303287} - component: {fileID: 7295078377801303284} + - component: {fileID: 6344396055313976660} m_Layer: 5 m_Name: Add m_TagString: Untagged @@ -716,6 +730,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 +--- !u!225 &6344396055313976660 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7295078377801303281} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 --- !u!1 &7295078378124140422 GameObject: m_ObjectHideFlags: 0 @@ -864,7 +890,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2741c97e96d043044b88f783f1f16738, type: 3} m_Name: m_EditorClassIdentifier: - value: 0 + Value: 0 isPointerDown: 0 onValueChanged: m_PersistentCalls: @@ -882,6 +908,7 @@ GameObject: - component: {fileID: 7295078378630584600} - component: {fileID: 7295078378630584601} - component: {fileID: 7295078378630584606} + - component: {fileID: 2853135804545143049} m_Layer: 5 m_Name: Sub m_TagString: Untagged @@ -1037,6 +1064,18 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 +--- !u!225 &2853135804545143049 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7295078378630584603} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 --- !u!1 &7632137574064115561 GameObject: m_ObjectHideFlags: 0 @@ -1050,6 +1089,7 @@ GameObject: - component: {fileID: 3545593516434423571} - component: {fileID: 1094262001776545265} - component: {fileID: 2408283735335238293} + - component: {fileID: 5459784629053661872} m_Layer: 5 m_Name: Rst m_TagString: Untagged @@ -1189,3 +1229,15 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 +--- !u!225 &5459784629053661872 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7632137574064115561} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 1 diff --git a/Assets/Scenes/WACVR.unity b/Assets/Scenes/WACVR.unity index f8159f5..d0dc90f 100644 --- a/Assets/Scenes/WACVR.unity +++ b/Assets/Scenes/WACVR.unity @@ -709,7 +709,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &90706075 stripped GameObject: @@ -1213,7 +1213,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1688695918} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!136 &182119968 CapsuleCollider: @@ -3812,6 +3812,50 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.00038862746, y: 0.0006574615, z: 0.0028851903} m_Center: {x: 0.0000000010461952, y: -0.0000064460583, z: -0.0014039748} +--- !u!1 &728980769 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 728980771} + - component: {fileID: 728980770} + m_Layer: 0 + m_Name: IPCManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &728980770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728980769} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ddced15d8eef61f4d8c51a05cff9f958, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &728980771 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728980769} + m_LocalRotation: {x: -0, y: 1, z: -0, w: 0} + m_LocalPosition: {x: 0.0421, y: 1.0341, z: -0.055} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &733961431 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4419,12 +4463,6 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1774209490} m_PrefabAsset: {fileID: 0} ---- !u!224 &862273498 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6563380806834325902, guid: 5da4516f609052242915c455fc208ca2, - type: 3} - m_PrefabInstance: {fileID: 8225331326148453084} - m_PrefabAsset: {fileID: 0} --- !u!65 &864137101 BoxCollider: m_ObjectHideFlags: 0 @@ -4577,7 +4615,7 @@ GameObject: - component: {fileID: 910165457} - component: {fileID: 910165458} m_Layer: 0 - m_Name: Serial + m_Name: TouchManager m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4607,7 +4645,7 @@ MonoBehaviour: m_GameObject: {fileID: 910165456} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c08c82d8bfafe7b4bb4386ab2dd79d9c, type: 3} + m_Script: {fileID: 11500000, guid: e001316a6dab3f04cbb2525904cfd6c8, type: 3} m_Name: m_EditorClassIdentifier: --- !u!224 &911390658 stripped @@ -5125,16 +5163,16 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 968258289} - m_LocalRotation: {x: -0.4260401, y: -0.42604008, z: 0.564349, w: 0.56434906} - m_LocalPosition: {x: 364, y: -6, z: -46} + m_LocalRotation: {x: -0.4260401, y: -0.42604008, z: 0.56434906, w: 0.56434906} + m_LocalPosition: {x: 514.00006, y: -6.000023, z: -46} m_LocalScale: {x: 15, y: 1, z: 30} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1989318070} - {fileID: 937211620} - {fileID: 112502617} - m_Father: {fileID: 862273498} - m_RootOrder: 2 + m_Father: {fileID: 1331449495} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: -74.1, z: 90} --- !u!64 &968258291 MeshCollider: @@ -7314,6 +7352,8 @@ MonoBehaviour: - {fileID: 1051197778} - {fileID: 1444436736} - {fileID: 939615484} + isIPCIdle: 0 + useIPCLighting: 1 FadeDuration: 0.3 --- !u!4 &1251312952 Transform: @@ -7571,6 +7611,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: LightManager: {fileID: 1251312951} +--- !u!224 &1331449495 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6563380805594740092, guid: 5da4516f609052242915c455fc208ca2, + type: 3} + m_PrefabInstance: {fileID: 8225331326148453084} + m_PrefabAsset: {fileID: 0} --- !u!224 &1334366885 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 4545477537435998766, guid: 5da4516f609052242915c455fc208ca2, @@ -8977,8 +9023,8 @@ Transform: m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} m_ConstrainProportionsScale: 1 m_Children: - - {fileID: 1740661842} - {fileID: 182119967} + - {fileID: 1740661842} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 23, y: 35, z: 0} @@ -9452,7 +9498,7 @@ Camera: width: 1 height: 1 near clip plane: 0.1 - far clip plane: 50 + far clip plane: 6 field of view: 40 orthographic: 0 orthographic size: 5 @@ -9484,7 +9530,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1688695918} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 7.278, y: 21.625, z: 0.272} --- !u!114 &1740661843 MonoBehaviour: @@ -29767,7 +29813,7 @@ Camera: width: 1 height: 1 near clip plane: 0.1 - far clip plane: 10 + far clip plane: 5 field of view: 60 orthographic: 0 orthographic size: 5 @@ -32094,7 +32140,7 @@ RectTransform: - {fileID: 818854852} - {fileID: 1785707800} m_Father: {fileID: 1748802425554287224} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -32315,7 +32361,7 @@ RectTransform: - {fileID: 911390658} - {fileID: 1808507365} m_Father: {fileID: 1748802425554287224} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -32396,8 +32442,8 @@ RectTransform: m_LocalScale: {x: 0.00175, y: 0.00175, z: 0.00175} m_ConstrainProportionsScale: 1 m_Children: - - {fileID: 1748802424534997467} - {fileID: 1748802424439818172} + - {fileID: 1748802424534997467} - {fileID: 1748802424285800368} - {fileID: 1748802424301928155} m_Father: {fileID: 0} @@ -32425,7 +32471,7 @@ MonoBehaviour: m_CheckFor3DOcclusion: 0 m_BlockingMask: serializedVersion: 2 - m_Bits: 4294967295 + m_Bits: 127 m_RaycastTriggerInteraction: 1 --- !u!114 &1748802425554287226 MonoBehaviour: @@ -32510,7 +32556,7 @@ MonoBehaviour: m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 - m_Bits: 4294967295 + m_Bits: 127 --- !u!222 &1748802425967121442 CanvasRenderer: m_ObjectHideFlags: 0 @@ -32812,6 +32858,16 @@ PrefabInstance: propertyPath: m_text value: 'Hand Size:' objectReference: {fileID: 0} + - target: {fileID: 840120427923841567, guid: 48a5eb7af38418f47aa7dd9c8f4512d7, + type: 3} + propertyPath: m_margin.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 840120427923841567, guid: 48a5eb7af38418f47aa7dd9c8f4512d7, + type: 3} + propertyPath: m_geometrySortingOrder + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1014690918283339427, guid: 48a5eb7af38418f47aa7dd9c8f4512d7, type: 3} propertyPath: m_AnchorMax.x @@ -33249,6 +33305,11 @@ PrefabInstance: propertyPath: m_text value: 'Capture FPS:' objectReference: {fileID: 0} + - target: {fileID: 840120427923841567, guid: 5da4516f609052242915c455fc208ca2, + type: 3} + propertyPath: m_RaycastTarget + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4545477537435998766, guid: 5da4516f609052242915c455fc208ca2, type: 3} propertyPath: m_Pivot.x @@ -34095,6 +34156,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1748802424439818172} m_Modifications: + - target: {fileID: 840120427923841567, guid: 5da4516f609052242915c455fc208ca2, + type: 3} + propertyPath: m_RaycastTarget + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4545477537435998766, guid: 5da4516f609052242915c455fc208ca2, type: 3} propertyPath: m_Pivot.x diff --git a/Assets/Script/IPCManager.meta b/Assets/Script/IPCManager.meta new file mode 100644 index 0000000..bcddf2f --- /dev/null +++ b/Assets/Script/IPCManager.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e174a01615947664f9e6caee3808ad5e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/IPCManager/IPCManager.asmdef b/Assets/Script/IPCManager/IPCManager.asmdef new file mode 100644 index 0000000..90337cf --- /dev/null +++ b/Assets/Script/IPCManager/IPCManager.asmdef @@ -0,0 +1,3 @@ +{ + "name": "IPCManager" +} diff --git a/Assets/Script/IPCManager/IPCManager.asmdef.meta b/Assets/Script/IPCManager/IPCManager.asmdef.meta new file mode 100644 index 0000000..b842b6f --- /dev/null +++ b/Assets/Script/IPCManager/IPCManager.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4b68ab8531bd5864db8bb4af74c61824 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/IPCManager/IPCManager.cs b/Assets/Script/IPCManager/IPCManager.cs new file mode 100644 index 0000000..3b7af18 --- /dev/null +++ b/Assets/Script/IPCManager/IPCManager.cs @@ -0,0 +1,67 @@ +using System.Collections; +using System.Collections.Generic; +using System.IO.MemoryMappedFiles; +using System.Security.Principal; +using UnityEngine; + +public class IPCManager : MonoBehaviour +{ + public static MemoryMappedFile sharedBuffer; + public static MemoryMappedViewAccessor sharedBufferAccessor; + public static bool isInitialized = false; + + private void Awake() + { + EnsureInitialization(); + } + private static void EnsureInitialization() + { + if (!isInitialized) + InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164); + } + + private IEnumerator ReconnectWait() + { + yield return new WaitForSeconds(5); + InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164); + } + + private void Reconnect() + { + InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164); + } + + private static void InitializeIPC(string sharedMemoryName, int sharedMemorySize) + { + MemoryMappedFileSecurity CustomSecurity = new MemoryMappedFileSecurity(); + SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null); + var acct = sid.Translate(typeof(NTAccount)) as NTAccount; + CustomSecurity.AddAccessRule(new System.Security.AccessControl.AccessRule(acct.ToString(), MemoryMappedFileRights.FullControl, System.Security.AccessControl.AccessControlType.Allow)); + sharedBuffer = MemoryMappedFile.CreateOrOpen(sharedMemoryName, sharedMemorySize, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, CustomSecurity, System.IO.HandleInheritability.Inheritable); + sharedBufferAccessor = sharedBuffer.CreateViewAccessor(); + isInitialized = true; + } + + public static byte[] GetLightData() + { + EnsureInitialization(); + byte[] bytes = new byte[1920]; + IPCManager.sharedBufferAccessor.ReadArray(244, bytes, 0, 1920); + return bytes; + } + + public static void SetTouchData(bool[] bytes) + { + EnsureInitialization(); + IPCManager.sharedBufferAccessor.WriteArray(4, bytes, 0, 240); + } + + public static void SetTouch(int index, bool value) + { + EnsureInitialization(); + if (value) + IPCManager.sharedBufferAccessor.Write(4 + index, 1); + else + IPCManager.sharedBufferAccessor.Write(4 + index, 0); + } +} diff --git a/Assets/Script/Serial/Serial.cs.meta b/Assets/Script/IPCManager/IPCManager.cs.meta similarity index 83% rename from Assets/Script/Serial/Serial.cs.meta rename to Assets/Script/IPCManager/IPCManager.cs.meta index a806e1f..f818c78 100644 --- a/Assets/Script/Serial/Serial.cs.meta +++ b/Assets/Script/IPCManager/IPCManager.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c08c82d8bfafe7b4bb4386ab2dd79d9c +guid: ddced15d8eef61f4d8c51a05cff9f958 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Script/LightManager/LightManager.asmdef b/Assets/Script/LightManager/LightManager.asmdef index 0711add..dcec877 100644 --- a/Assets/Script/LightManager/LightManager.asmdef +++ b/Assets/Script/LightManager/LightManager.asmdef @@ -2,7 +2,8 @@ "name": "LightManager", "rootNamespace": "", "references": [ - "GUID:80de51a1f88203a4cb129a5922de311f" + "GUID:80de51a1f88203a4cb129a5922de311f", + "GUID:4b68ab8531bd5864db8bb4af74c61824" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Script/LightManager/LightManager.cs b/Assets/Script/LightManager/LightManager.cs index fcc2f29..c9d1edb 100644 --- a/Assets/Script/LightManager/LightManager.cs +++ b/Assets/Script/LightManager/LightManager.cs @@ -8,13 +8,12 @@ public class LightManager : MonoBehaviour { public List Lights = new List(); List Materials = new List(); - public static bool isIPCIdle = false; - public static bool IsUseIPC = true; + [SerializeField] + public bool isIPCIdle = true; + [SerializeField] + public bool useIPCLighting = true; static Texture2D RGBColor2D; - public static MemoryMappedFile sharedBuffer; - public static MemoryMappedViewAccessor sharedBufferAccessor; - private IEnumerator[] coroutines = new IEnumerator[240]; public float FadeDuration = 0.5f; @@ -27,9 +26,8 @@ public class LightManager : MonoBehaviour for (int i = 0; i < Lights.Count; i++) Materials.Add(Lights[i].GetComponent().material); - if (IsUseIPC) + if (useIPCLighting) { - InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164); RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false); //RGBColor2D.filterMode = FilterMode.Point; //for debugging //GetComponent().material.mainTexture = RGBColor2D; //for debugging @@ -37,18 +35,23 @@ public class LightManager : MonoBehaviour } private void Update() { - if (sharedBuffer != null) - GetTextureFromBytes(GetBytesFromMemory()); - else + if (!useIPCLighting) return; - if (IsUseIPC) + if (IPCManager.sharedBuffer != null) + { + GetTextureFromBytes(IPCManager.GetLightData()); CheckIPCState(); - if (!isIPCIdle) - UpdateLED(); + if (!isIPCIdle) + UpdateLED(); + } + else + { + isIPCIdle = true; + } } void UpdateConfig() { - IsUseIPC = ConfigManager.config.useIPCLighting; + useIPCLighting = ConfigManager.config.useIPCLighting; } private void CheckIPCState() { @@ -57,15 +60,6 @@ public class LightManager : MonoBehaviour else isIPCIdle = true; } - private void InitializeIPC(string sharedMemoryName, int sharedMemorySize) - { - MemoryMappedFileSecurity CustomSecurity = new MemoryMappedFileSecurity(); - SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null); - var acct = sid.Translate(typeof(NTAccount)) as NTAccount; - CustomSecurity.AddAccessRule(new System.Security.AccessControl.AccessRule(acct.ToString(), MemoryMappedFileRights.FullControl, System.Security.AccessControl.AccessControlType.Allow)); - sharedBuffer = MemoryMappedFile.CreateOrOpen(sharedMemoryName, sharedMemorySize, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, CustomSecurity, System.IO.HandleInheritability.Inheritable); - sharedBufferAccessor = sharedBuffer.CreateViewAccessor(); - } private void UpdateLED() { int index = 0; @@ -86,15 +80,9 @@ public class LightManager : MonoBehaviour RGBColor2D.LoadRawTextureData(bytes); RGBColor2D.Apply(); } - byte[] GetBytesFromMemory() - { - byte[] bytes = new byte[1920]; - sharedBufferAccessor.ReadArray(244, bytes, 0, 1920); - return bytes; - } public void UpdateLightFade(int Area, bool State) { - if(!isIPCIdle) + if(!isIPCIdle || useIPCLighting) return; Area -= 1; diff --git a/Assets/Script/Serial.meta b/Assets/Script/TouchManager.meta similarity index 100% rename from Assets/Script/Serial.meta rename to Assets/Script/TouchManager.meta diff --git a/Assets/Script/Serial/ColliderToSerial.cs b/Assets/Script/TouchManager/ColliderToTouch.cs similarity index 86% rename from Assets/Script/Serial/ColliderToSerial.cs rename to Assets/Script/TouchManager/ColliderToTouch.cs index f4ef8a8..3345181 100644 --- a/Assets/Script/Serial/ColliderToSerial.cs +++ b/Assets/Script/TouchManager/ColliderToTouch.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Collections; -public class ColliderToSerial : MonoBehaviour +public class ColliderToTouch : MonoBehaviour { public LightManager LightManager; private int _insideColliderCount = 0; @@ -18,7 +18,7 @@ public class ColliderToSerial : MonoBehaviour private void OnTriggerEnter(Collider other) { _insideColliderCount += 1; - Serial.SetTouch(Area, true); + TouchManager.SetTouch(Area, true); touchDidChange?.Invoke(); LightManager.UpdateLightFade(Area, true); } @@ -29,7 +29,7 @@ public class ColliderToSerial : MonoBehaviour _insideColliderCount = Mathf.Max(0, _insideColliderCount); if (_insideColliderCount == 0) { - Serial.SetTouch(Area, false); + TouchManager.SetTouch(Area, false); touchDidChange?.Invoke(); LightManager.UpdateLightFade(Area, false); } diff --git a/Assets/Script/Serial/ColliderToSerial.cs.meta b/Assets/Script/TouchManager/ColliderToTouch.cs.meta similarity index 100% rename from Assets/Script/Serial/ColliderToSerial.cs.meta rename to Assets/Script/TouchManager/ColliderToTouch.cs.meta diff --git a/Assets/Script/Serial/Serial.asmdef b/Assets/Script/TouchManager/TouchManager.asmdef similarity index 78% rename from Assets/Script/Serial/Serial.asmdef rename to Assets/Script/TouchManager/TouchManager.asmdef index 757d3a7..b3be6d7 100644 --- a/Assets/Script/Serial/Serial.asmdef +++ b/Assets/Script/TouchManager/TouchManager.asmdef @@ -2,7 +2,8 @@ "name": "Serial", "rootNamespace": "", "references": [ - "GUID:476196b3fd6829e45b839eb138f356ed" + "GUID:476196b3fd6829e45b839eb138f356ed", + "GUID:4b68ab8531bd5864db8bb4af74c61824" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Script/Serial/Serial.asmdef.meta b/Assets/Script/TouchManager/TouchManager.asmdef.meta similarity index 100% rename from Assets/Script/Serial/Serial.asmdef.meta rename to Assets/Script/TouchManager/TouchManager.asmdef.meta diff --git a/Assets/Script/Serial/Serial.cs b/Assets/Script/TouchManager/TouchManager.cs similarity index 95% rename from Assets/Script/Serial/Serial.cs rename to Assets/Script/TouchManager/TouchManager.cs index d6f50a0..bbf2b91 100644 --- a/Assets/Script/Serial/Serial.cs +++ b/Assets/Script/TouchManager/TouchManager.cs @@ -5,7 +5,7 @@ using System.Threading; using System.IO.Ports; using System.Linq; using UnityEngine; -public class Serial : MonoBehaviour +public class TouchManager : MonoBehaviour { const byte CMD_GET_SYNC_BOARD_VER = 0xa0; @@ -55,7 +55,7 @@ public class Serial : MonoBehaviour _touchThread = new Thread(TouchThreadLoop); InvokeRepeating("PingTouchThread", 0, 1); //Send touch updates whenever actual state changes to achieve desired update frequency without overloading - ColliderToSerial.touchDidChange += PingTouchThread; + ColliderToTouch.touchDidChange += PingTouchThread; } private void PingTouchThread() @@ -85,8 +85,8 @@ public class Serial : MonoBehaviour ReadHead(ComL, 0); if (ComR.IsOpen) ReadHead(ComR, 1); - // if (Input.GetKeyDown(KeyCode.M)) //this is a touch test code - // StartCoroutine(TouchTest(true)); + if (Input.GetKeyDown(KeyCode.M)) //this is a touch test code + StartCoroutine(TouchTest(true)); if (Input.GetKeyDown(KeyCode.M) && StartUp) SendTouchState(); } @@ -230,19 +230,23 @@ public class Serial : MonoBehaviour } public static void SetTouch(int Area, bool State) //set touch data 0-239 { - //Area +=1; - if (Area < 121) + Area -= 1; + if (Area < 120) { - Area += (Area-1) / 5 * 3 + 7; + TouchPackAll[Area + 120] = State; + + Area += Area / 5 * 3 + 7; ByteHelper.SetBit(TouchPackR, Area, State); } else if (Area >= 120) { + TouchPackAll[Area - 120] = State; + Area -= 120; - Area += (Area-1) / 5 * 3 + 7; + Area += Area / 5 * 3 + 7; ByteHelper.SetBit(TouchPackL, Area, State); } - TouchPackAll[Area] = State; + IPCManager.SetTouchData(TouchPackAll); } } diff --git a/Assets/Script/TouchManager/TouchManager.cs.meta b/Assets/Script/TouchManager/TouchManager.cs.meta new file mode 100644 index 0000000..60e8324 --- /dev/null +++ b/Assets/Script/TouchManager/TouchManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e001316a6dab3f04cbb2525904cfd6c8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Texture/Card.png.meta b/Assets/Texture/Card.png.meta index ab23bd4..161fb16 100644 --- a/Assets/Texture/Card.png.meta +++ b/Assets/Texture/Card.png.meta @@ -3,7 +3,7 @@ guid: f2a11b8bb9493024982d42c93ff3f9de TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Texture/WoodFloor007_1K_Color.jpg.meta b/Assets/Texture/WoodFloor007_1K_Color.jpg.meta index c261004..a568a37 100644 --- a/Assets/Texture/WoodFloor007_1K_Color.jpg.meta +++ b/Assets/Texture/WoodFloor007_1K_Color.jpg.meta @@ -3,7 +3,7 @@ guid: d252922176d51834db1a230a3a3f26ca TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Texture/WoodFloor007_1K_NormalDX.jpg.meta b/Assets/Texture/WoodFloor007_1K_NormalDX.jpg.meta index 3b3e3d6..14b14de 100644 --- a/Assets/Texture/WoodFloor007_1K_NormalDX.jpg.meta +++ b/Assets/Texture/WoodFloor007_1K_NormalDX.jpg.meta @@ -3,7 +3,7 @@ guid: eba630737fd5c3d4b95859a8c16a6ffc TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Texture/WoodFloor007_1K_Roughness.jpg.meta b/Assets/Texture/WoodFloor007_1K_Roughness.jpg.meta index e3b80c7..ec8dbef 100644 --- a/Assets/Texture/WoodFloor007_1K_Roughness.jpg.meta +++ b/Assets/Texture/WoodFloor007_1K_Roughness.jpg.meta @@ -3,7 +3,7 @@ guid: d9ad228a4f815574685d62384aa96889 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Texture/locked.png.meta b/Assets/Texture/locked.png.meta index 8b577b5..7b5e931 100644 --- a/Assets/Texture/locked.png.meta +++ b/Assets/Texture/locked.png.meta @@ -3,7 +3,7 @@ guid: 0e86a807c3282a442b3915b99b76e30b TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Texture/unlocked.png.meta b/Assets/Texture/unlocked.png.meta index abaec1f..7dd58dd 100644 --- a/Assets/Texture/unlocked.png.meta +++ b/Assets/Texture/unlocked.png.meta @@ -3,7 +3,7 @@ guid: 9a39b28f16a08a04db0433e352bf8e26 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 12 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -63,6 +63,7 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -76,6 +77,30 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 7a11e0f..950b1d6 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -12,7 +12,7 @@ TagManager: - Water - UI - TPBlock - - + - UIText - - - diff --git a/mercuryio/mercuryio.c b/mercuryio/mercuryio.c index 2ccb691..56fbdb6 100644 --- a/mercuryio/mercuryio.c +++ b/mercuryio/mercuryio.c @@ -137,7 +137,7 @@ void mercury_io_touch_set_leds(struct led_data data) { if (FileMapping) { - data.rgba[3] = 0xFF; //IPC enable flag + data.rgba[3] = 0xFF; //IPC idle flag memcpy(FileMapping->RGBAData, data.rgba, 480 * 4); } //for (size_t i = 0; i < 32; i++) @@ -158,7 +158,7 @@ static unsigned int __stdcall mercury_io_touch_thread_proc(void *ctx) } callback(cellPressed); - Sleep(1); + //Sleep(1); } return 0;