diff --git a/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat b/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat new file mode 100644 index 00000000..0c156610 --- /dev/null +++ b/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat @@ -0,0 +1,79 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ganzi1 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.66518503, g: 0.66518503, b: 0.66518503, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat.meta b/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat.meta new file mode 100644 index 00000000..e7efded2 --- /dev/null +++ b/U3D_DrivingSystem/Assets/GameAssets/Art/交通路标/Materials/ganzi1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a9c23a6da8f6e046abbf16f5d8b6add +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/U3D_DrivingSystem/Assets/Scenes/main_.unity b/U3D_DrivingSystem/Assets/Scenes/main_.unity index a6f5c77e..37a71c9c 100644 --- a/U3D_DrivingSystem/Assets/Scenes/main_.unity +++ b/U3D_DrivingSystem/Assets/Scenes/main_.unity @@ -90050,7 +90050,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &463649141 Transform: m_ObjectHideFlags: 0 diff --git a/U3D_DrivingSystem/Assets/Script/CarGearControl.cs b/U3D_DrivingSystem/Assets/Script/CarGearControl.cs index 953fcd56..4ab24a2f 100644 --- a/U3D_DrivingSystem/Assets/Script/CarGearControl.cs +++ b/U3D_DrivingSystem/Assets/Script/CarGearControl.cs @@ -63,7 +63,7 @@ namespace Script vehicleController = GetComponent(); vehicleStandardInput = GetComponent(); - // StartModbus(); + StartModbus(); ModBusQueue(); } @@ -95,17 +95,17 @@ namespace Script while (true) { // Debug.Log(client.modbusQueue.Count); - // if (client.modbusQueue.Count > 0) - // { - // // Debug.Log(client.modbusQueue.Count); - // - // carData = client.modbusQueue.Dequeue(); - - if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0) + if (client.modbusQueue.Count > 0) { - // Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count); + // Debug.Log(client.modbusQueue.Count); - carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue(); + carData = client.modbusQueue.Dequeue(); + + // if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0) + // { + // // Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count); + // + // carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue(); //方向盘