1
0
mirror of synced 2024-11-12 01:00:52 +01:00

Add LED IPC

This commit is contained in:
xpeng 2022-07-29 18:49:56 +02:00
parent 54c392fb39
commit 9919fabcf6
8 changed files with 235 additions and 89 deletions

2
.gitignore vendored
View File

@ -7,6 +7,7 @@
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Bb]uildCPP/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
@ -79,4 +80,3 @@ uWindowCapture.log
# Game configuration file
config.json

View File

@ -8,15 +8,15 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Material.001
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Shader: {fileID: 4800000, guid: 6661b5a6c9b5f6e45ae07f0fa22876e2, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_InvalidKeywords:
- _FLIPBOOKBLENDING_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
@ -81,15 +81,28 @@ Material:
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _ColorMode: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0.1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _FlipX: 0
- _FlipY: 0
- _FlipbookBlending: 0
- _FlipbookMode: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
@ -101,6 +114,9 @@ Material:
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
@ -109,8 +125,11 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1}
- _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1}
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _CameraFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &155017172321468035

View File

@ -10272,6 +10272,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c08c82d8bfafe7b4bb4386ab2dd79d9c, type: 3}
m_Name:
m_EditorClassIdentifier:
inByte: 0
--- !u!114 &911618253
MonoBehaviour:
m_ObjectHideFlags: 0
@ -13702,6 +13703,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1251312952}
- component: {fileID: 1251312954}
- component: {fileID: 1251312953}
- component: {fileID: 1251312951}
m_Layer: 0
m_Name: LightManager
@ -13972,14 +13975,64 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1251312950}
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_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.95, z: -0.524}
m_LocalScale: {x: 0.15, y: 0, z: 0.005}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!23 &1251312953
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1251312950}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c783e0f4a42a5c54a95a2ea55e1b42d1, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1251312954
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1251312950}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1256711831
GameObject:
m_ObjectHideFlags: 0
@ -34414,8 +34467,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4132370725483181716}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.028199367, y: 0.000000044703484, z: -0.000000059604645}
m_LocalScale: {x: 1.1738298, y: 0.99999976, z: 1.0000004}
m_LocalPosition: {x: -0.028199367, y: 0.000000037252903, z: -0.000000052154064}
m_LocalScale: {x: 1.1738298, y: 0.9999997, z: 1.0000002}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8291635641984613349}
@ -34445,8 +34498,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3430441728000144673}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.019990563, y: -0.000000037401843, z: -0.000000014901161}
m_LocalScale: {x: 1.1407824, y: 1.0000001, z: 1}
m_LocalPosition: {x: -0.01999057, y: -0.00000003989793, z: -0.000000007450581}
m_LocalScale: {x: 1.1407824, y: 1.0000005, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6865718682060524960}
@ -34478,7 +34531,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5573350093377499391}
m_LocalRotation: {x: -0, y: -0, z: 0.0000000013969839, w: 1}
m_LocalPosition: {x: -0.051807564, y: -0.000000006170012, z: 0.0000000121071935}
m_LocalPosition: {x: -0.051807564, y: 9.313226e-10, z: 0.000000016763806}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34493,8 +34546,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6640547207365133130}
m_LocalRotation: {x: 0.6514989, y: -0.026312554, z: 0.7483092, w: 0.12202541}
m_LocalPosition: {x: 0.009299207, y: 0.01125808, z: 0.020413078}
m_LocalRotation: {x: 0.65149885, y: -0.0263126, z: 0.74830925, w: 0.12202538}
m_LocalPosition: {x: 0.009299212, y: 0.01125808, z: 0.020413082}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34509,8 +34562,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8716313783523344810}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.04795775, y: -0.00000006053597, z: -0.000000022118911}
m_LocalRotation: {x: -0, y: -0, z: 0.0000000018626449, w: 1}
m_LocalPosition: {x: -0.04795774, y: -0.000000062864274, z: -0.000000022351742}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34525,8 +34578,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5904268464620118195}
m_LocalRotation: {x: 0.59079105, y: -0.10473215, z: 0.78657204, w: 0.14595029}
m_LocalPosition: {x: 0.01912775, y: 0.005076389, z: 0.022347964}
m_LocalRotation: {x: 0.59079105, y: -0.10473216, z: 0.78657216, w: 0.14595024}
m_LocalPosition: {x: 0.019127756, y: 0.005076389, z: 0.022347966}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34560,8 +34613,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5067349274084691898}
m_LocalRotation: {x: -0, y: -0, z: 7.566996e-10, w: 1}
m_LocalPosition: {x: -0.060847066, y: 0.0000000121071935, z: -0.000000030660885}
m_LocalRotation: {x: -0, y: -0, z: -6.984919e-10, w: 1}
m_LocalPosition: {x: -0.060847066, y: 0.000000017578714, z: -0.000000022395398}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34576,8 +34629,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3026741579619398525}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.04128526, y: -0.000000007450581, z: 0}
m_LocalRotation: {x: -0.000000059604645, y: -0, z: 0.000000029802322, w: 1}
m_LocalPosition: {x: -0.04128526, y: -0.0000000055879354, z: 0.0000000027939677}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34624,7 +34677,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5410225876260837038}
m_LocalRotation: {x: 0.28813463, y: -0.51853585, z: 0.39487815, w: -0.7015485}
m_LocalRotation: {x: 0.28813466, y: -0.5185358, z: 0.39487815, w: -0.7015485}
m_LocalPosition: {x: -0.17739609, y: -0.18077399, z: 0.20514035}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -34641,7 +34694,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3749120158382215621}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.035532802, y: 0.000000042576097, z: 0.000000007450581}
m_LocalPosition: {x: -0.0355328, y: 0.00000004310558, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -34723,8 +34776,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6169819503582498194}
m_LocalRotation: {x: 0.76205033, y: 0.056835763, z: 0.6432321, w: 0.047974117}
m_LocalPosition: {x: -0.010603005, y: 0.010812533, z: 0.023641862}
m_LocalRotation: {x: 0.7620503, y: 0.05683576, z: 0.64323217, w: 0.04797411}
m_LocalPosition: {x: -0.0106029995, y: 0.010812533, z: 0.023641858}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -35994,7 +36047,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2259999406341563148}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.03695308, y: -0.0000000139830085, z: 0.0000000037252903}
m_LocalPosition: {x: -0.036953088, y: -0.000000012003948, z: 0.0000000034924597}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -36259,8 +36312,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6695050964844364514}
m_LocalRotation: {x: 0.5351684, y: -0.35755518, z: -0.019904885, w: 0.76508355}
m_LocalPosition: {x: -0.028540144, y: 0.004912788, z: -0.025196556}
m_LocalRotation: {x: 0.53516847, y: -0.35755515, z: -0.01990489, w: 0.76508355}
m_LocalPosition: {x: -0.02854015, y: 0.004912787, z: -0.025196552}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -36306,8 +36359,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 538319844972852557}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.023518845, y: -0.000000014326284, z: 0.000000027008355}
m_LocalScale: {x: 1.1291406, y: 0.9999998, z: 0.9999999}
m_LocalPosition: {x: -0.023518872, y: -0.00000002127348, z: 0.000000026775524}
m_LocalScale: {x: 1.1291406, y: 1.0000001, z: 0.9999998}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4221411138600420476}
@ -36335,8 +36388,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2206138008483047393}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.016176485, y: -0.000000040512532, z: -4.656613e-10}
m_LocalScale: {x: 1.3437861, y: 1.000001, z: 0.99999994}
m_LocalPosition: {x: -0.016176477, y: -0.000000039986613, z: 0.0000000011641532}
m_LocalScale: {x: 1.3437861, y: 1.0000008, z: 0.99999994}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3371950482210857493}
@ -36413,7 +36466,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4662424310893189105}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.039865024, y: 0.00000001607381, z: -0.000000014901161}
m_LocalPosition: {x: -0.039865013, y: 0.000000008182345, z: -0.000000014901161}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -36428,8 +36481,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1528925023998772697}
m_LocalRotation: {x: -0.0000000074505797, y: -0, z: 0.000000003026798, w: 1}
m_LocalPosition: {x: -0.05770287, y: 0.000000035390258, z: 0.000000014901161}
m_LocalRotation: {x: -0, y: -0, z: -0.0000000025029292, w: 1}
m_LocalPosition: {x: -0.057702873, y: 0.00000004284084, z: 0.000000022351742}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -37496,8 +37549,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1838837016619199698}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.022911444, y: 0.0000000070489334, z: -0.00000001071021}
m_LocalScale: {x: 1.147907, y: 1, z: 1}
m_LocalPosition: {x: -0.022911437, y: 0.0000000016938291, z: -0.0000000069849193}
m_LocalScale: {x: 1.147907, y: 1, z: 0.99999994}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5368281204346571926}
@ -37617,8 +37670,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6240631006074444401}
m_LocalRotation: {x: -0.073994935, y: -0.009242266, z: -0.075277865, w: 0.99437046}
m_LocalPosition: {x: -0.039762497, y: -0.01257918, z: -0.008710587}
m_LocalRotation: {x: -0.07399492, y: -0.009242207, z: -0.07527782, w: 0.99437046}
m_LocalPosition: {x: -0.039762497, y: -0.01257918, z: -0.00871058}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -37634,7 +37687,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1716433686722169745}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.02924449, y: -0.000000042405063, z: -0.000000011175868}
m_LocalPosition: {x: -0.029244501, y: -0.000000040978193, z: -0.000000007450581}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -37889,7 +37942,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8691136660814886320}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.036953058, y: 0.000000014763501, z: 0.0000000015227164}
m_LocalPosition: {x: -0.036953066, y: 0.000000018488791, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -37968,7 +38021,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2843035768736497997}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.039865002, y: 0.000000037566515, z: -0.000000031199306}
m_LocalPosition: {x: -0.03986499, y: 0.00000003609756, z: -0.00000003306195}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38046,8 +38099,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8745419925326491997}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.01617647, y: -0.0000000034842422, z: 0.000000007450581}
m_LocalScale: {x: 1.3437865, y: 0.99999976, z: 0.9999997}
m_LocalPosition: {x: -0.016176462, y: -0.0000000018626451, z: 0.000000007450581}
m_LocalScale: {x: 1.3437865, y: 0.9999997, z: 1.0000001}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5263490648690488489}
@ -38079,8 +38132,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6969391656505025521}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.023518816, y: -0.000000030591274, z: 0.000000022351742}
m_LocalScale: {x: 1.1291404, y: 1.0000005, z: 0.9999998}
m_LocalPosition: {x: -0.02351882, y: -0.00000003085138, z: 0.000000037252903}
m_LocalScale: {x: 1.1291404, y: 1.0000001, z: 0.9999999}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6725361686310294208}
@ -38094,8 +38147,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4263121744732394590}
m_LocalRotation: {x: 0.7938256, y: 0.39249596, z: 0.28816605, w: -0.36434624}
m_LocalPosition: {x: -0.017273607, y: -0.005359438, z: 0.032491885}
m_LocalRotation: {x: 0.79382557, y: 0.39249596, z: 0.28816608, w: -0.36434624}
m_LocalPosition: {x: -0.017273605, y: -0.005359437, z: 0.032491885}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38253,8 +38306,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3556457321568718029}
m_LocalRotation: {x: 0.7096613, y: 0.000907101, z: 0.6965909, w: 0.10555182}
m_LocalPosition: {x: -0.0007876095, y: 0.012132612, z: 0.02126948}
m_LocalRotation: {x: 0.7096613, y: 0.00090705644, z: 0.6965909, w: 0.105551854}
m_LocalPosition: {x: -0.00078760204, y: 0.012132612, z: 0.02126948}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38270,7 +38323,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8075447377399192877}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.029244423, y: 0.00000006752089, z: -0.000000008381903}
m_LocalPosition: {x: -0.02924443, y: 0.00000007414909, z: -0.0000000030267984}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38350,8 +38403,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9098647030989257326}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.022911444, y: -0.0000000056732876, z: -0.000000008816209}
m_LocalScale: {x: 1.147907, y: 0.99999994, z: 1}
m_LocalPosition: {x: -0.022911444, y: 0.0000000055025833, z: -0.000000007450581}
m_LocalScale: {x: 1.147907, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3296573984380820010}
@ -38380,8 +38433,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8284348389673194341}
m_LocalRotation: {x: -0, y: -0, z: 4.656613e-10, w: 1}
m_LocalPosition: {x: -0.05770292, y: -0.00000006998016, z: 0.000000005820766}
m_LocalRotation: {x: -0, y: -0, z: -0.0000000024447218, w: 1}
m_LocalPosition: {x: -0.057702918, y: -0.000000065920176, z: 0.000000010244548}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38427,7 +38480,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5213865795939722141}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.019990563, y: -0.0000000043353214, z: -0.000000012252713}
m_LocalPosition: {x: -0.019990563, y: -0.000000018887208, z: -0.000000006679329}
m_LocalScale: {x: 1.1407828, y: 0.9999998, z: 1.0000004}
m_ConstrainProportionsScale: 0
m_Children:
@ -38471,8 +38524,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6816513069343973416}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.028199375, y: 0.000000018626451, z: 0.0000000037252903}
m_LocalScale: {x: 1.1738296, y: 0.9999999, z: 0.99999994}
m_LocalPosition: {x: -0.028199382, y: 0.00000002216991, z: 0.0000000046566155}
m_LocalScale: {x: 1.1738296, y: 0.99999994, z: 0.99999994}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1500245604748373337}
@ -38499,8 +38552,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4316640054179911158}
m_LocalRotation: {x: -0.104890674, y: 0.06845513, z: -0.06767921, w: 0.9898138}
m_LocalPosition: {x: -0.04061893, y: -0.011704702, z: 0.0013762154}
m_LocalRotation: {x: -0.10489069, y: 0.06845519, z: -0.06767917, w: 0.9898138}
m_LocalPosition: {x: -0.040618926, y: -0.011704706, z: 0.001376221}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38515,8 +38568,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2249177436517029654}
m_LocalRotation: {x: 0.000000029802319, y: -0, z: 0.0000000074505797, w: 1}
m_LocalPosition: {x: -0.047957666, y: 0.000000052154064, z: 0.000000011175871}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.04795767, y: 0.00000005401671, z: 0.000000022351742}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38544,8 +38597,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3069409455629936195}
m_LocalRotation: {x: -0, y: 0.000000029802322, z: -0.0000000018626451, w: 1}
m_LocalPosition: {x: -0.05180757, y: -0.000000020489097, z: 0.0000000037252903}
m_LocalRotation: {x: -0, y: -0, z: -0.0000000018626451, w: 1}
m_LocalPosition: {x: -0.05180757, y: -0.000000013038516, z: 0.000000007450581}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38604,7 +38657,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6036990814742841209}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.035532825, y: 0.000000014605691, z: -0.000000009589712}
m_LocalPosition: {x: -0.035532825, y: 0.000000017703698, z: -0.0000000086729415}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38632,7 +38685,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3230422369903083538}
m_LocalRotation: {x: -0.2881346, y: 0.518536, z: -0.39487806, w: 0.7015485}
m_LocalRotation: {x: -0.28813463, y: 0.5185359, z: -0.39487806, w: 0.7015485}
m_LocalPosition: {x: -0.17739601, y: -0.18077394, z: 0.2051403}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -38707,7 +38760,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5602788739974014401}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.04128523, y: 0.000000011175871, z: 0.000000063329935}
m_LocalPosition: {x: -0.04128523, y: 0.000000014901161, z: 0.000000055879354}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38754,8 +38807,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2419251670711867654}
m_LocalRotation: {x: -0, y: -0, z: -0.0000000037252899, w: 1}
m_LocalPosition: {x: -0.060847074, y: -0.000000016763806, z: 0.000000022351742}
m_LocalRotation: {x: -0, y: -0, z: 0.0000000037252903, w: 1}
m_LocalPosition: {x: -0.06084707, y: -0.000000015832484, z: 0.000000007450581}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38796,8 +38849,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3904641906458686991}
m_LocalRotation: {x: -0.17725918, y: 0.1384381, z: -0.029145643, w: 0.9739429}
m_LocalPosition: {x: -0.03868401, y: -0.005522955, z: 0.011204768}
m_LocalRotation: {x: -0.17725916, y: 0.13843817, z: -0.029145628, w: 0.9739429}
m_LocalPosition: {x: -0.038684007, y: -0.005522959, z: 0.011204775}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -38902,8 +38955,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3629802225551022894}
m_LocalRotation: {x: 0.006266266, y: -0.08401713, z: -0.074111834, w: 0.9936847}
m_LocalPosition: {x: -0.037390165, y: -0.011259187, z: -0.01852595}
m_LocalRotation: {x: 0.006266251, y: -0.0840171, z: -0.07411179, w: 0.99368477}
m_LocalPosition: {x: -0.037390172, y: -0.011259187, z: -0.018525947}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:

View File

@ -27,6 +27,7 @@ public class SettingsManager : MonoBehaviour
{
FocusChecked=true;
UpdateAllConfigs();
Debug.Log("Configs Updated");
}
}
if (!Application.isFocused)
@ -38,7 +39,7 @@ public class SettingsManager : MonoBehaviour
UwcConfig.UpdateConfigs();
UpdatePhysicFPS();
UpdateHands();
Debug.Log("Configs Updated");
}
void UpdatePhysicFPS()

View File

@ -1,3 +1,16 @@
{
"name": "LightManager"
}
"name": "LightManager",
"rootNamespace": "",
"references": [
"GUID:80de51a1f88203a4cb129a5922de311f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -1,25 +1,85 @@
using System.Collections;
using System.Collections.Generic;
using System.IO.MemoryMappedFiles;
using System.Security.Principal;
using UnityEngine;
public class LightManager : MonoBehaviour
{
public List<GameObject> Lights = new List<GameObject>();
public List<Material> Materials = new List<Material>();
public float FadeDuration = 0.5f;
List<Material> Materials = new List<Material>();
public static bool useIPC = true;
static Texture2D RGBColor2D;
public static MemoryMappedFile sharedBuffer;
public static MemoryMappedViewAccessor sharedBufferAccessor;
private IEnumerator[] coroutines = new IEnumerator[240];
public float FadeDuration = 0.5f;
private void Start()
{
if (JsonConfiguration.HasKey("useIPC"))
useIPC = JsonConfiguration.GetBoolean("useIPC");
else
JsonConfiguration.SetBoolean("useIPC", useIPC);
for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material);
if (useIPC)
{
Materials[i] = Lights[i].GetComponent<Renderer>().material;
InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164);
RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false);
//RGBColor2D.filterMode = FilterMode.Point; //for debugging
//GetComponent<Renderer>().material.mainTexture = RGBColor2D; //for debugging
}
}
public void UpdateLight(int Area, bool State)
private void Update()
{
if (useIPC)
UpdateLED();
}
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<MemoryMappedFileRights>(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()
{
GetTextureFromBytes(GetBytesFromMemory());
int index = 0;
for (int i = 0; i < 30; i++)
{
for (int ii = 0; ii < 4; ii++)
{
Materials[119 - i - ii * 30].SetColor("_EmissionColor", RGBColor2D.GetPixel(index * 2, 0));
Materials[210 + i - ii * 30].SetColor("_EmissionColor", RGBColor2D.GetPixel((index + 120) * 2, 0));
index++;
}
}
}
void GetTextureFromBytes(byte[] bytes)
{
RGBColor2D.LoadRawTextureData(bytes);
RGBColor2D.Apply();
}
byte[] GetBytesFromMemory()
{
byte[] bytes = new byte[1920];
sharedBufferAccessor.ReadArray<byte>(244, bytes, 0, 1920);
return bytes;
}
public void UpdateLightFade(int Area, bool State)
{
if(useIPC)
return;
Area -= 1;
if (State)
{
Materials[Area].SetColor("_EmissionColor", new Color(1f, 1f, 1f, 1f));

View File

@ -22,7 +22,7 @@ public class ColliderToSerial : MonoBehaviour
_insideColliderCount += 1;
Serial.SetTouch(Area, true);
touchDidChange?.Invoke();
lightManager.UpdateLight(Area, true);
lightManager.UpdateLightFade(Area, true);
}
private void OnTriggerExit(Collider other)
@ -33,7 +33,7 @@ public class ColliderToSerial : MonoBehaviour
{
Serial.SetTouch(Area, false);
touchDidChange?.Invoke();
lightManager.UpdateLight(Area, false);
lightManager.UpdateLightFade(Area, false);
}
}
}

View File

@ -19,6 +19,7 @@ public class Serial : MonoBehaviour
private Thread _touchThread;
private Queue _touchQueue;
static SerialPort ComL = new SerialPort ("COM5", 115200);
static SerialPort ComR = new SerialPort ("COM6", 115200);
@ -122,7 +123,6 @@ public class Serial : MonoBehaviour
var data = Serial.ReadExisting();
SendResp(Serial, side, data);
}
}
void SendResp(SerialPort Serial, int side, string data)
{