更新asmdef-调试

upm-2.1.8
SuGar-456 1 month ago
parent d2f64da996
commit b84558c053
  1. 15
      Runtime/HandDriverUPM.Runtime.asmdef
  2. 4
      Samples~/Hand Driver Demo/Plugins/NaughtyAttributes/Core/NaughtyAttributes.Core.asmdef
  3. 2
      Samples~/Hand Driver Demo/Prefab.meta
  4. 828
      Samples~/Hand Driver Demo/Prefab/LeftHand.prefab
  5. 2
      Samples~/Hand Driver Demo/Prefab/LeftHand.prefab.meta
  6. 858
      Samples~/Hand Driver Demo/Prefab/RightHand.prefab
  7. 2
      Samples~/Hand Driver Demo/Prefab/RightHand.prefab.meta
  8. 8
      Samples~/Hand Driver Demo/Runtime.meta
  9. 7
      Samples~/Hand Driver Demo/Runtime/HandDriverUPM.Runtime.asmdef
  10. 7
      Samples~/Hand Driver Demo/Runtime/HandDriverUPM.Runtime.asmdef.meta
  11. 8
      Samples~/Hand Driver Demo/Runtime/Scripts.meta
  12. 698
      Samples~/Hand Driver Demo/Runtime/Scripts/HandDriver.cs
  13. 11
      Samples~/Hand Driver Demo/Runtime/Scripts/HandDriver.cs.meta
  14. 35
      Samples~/Hand Driver Demo/Runtime/Scripts/InputData.cs
  15. 11
      Samples~/Hand Driver Demo/Runtime/Scripts/InputData.cs.meta
  16. 207
      Samples~/Hand Driver Demo/Runtime/Scripts/Network.cs
  17. 11
      Samples~/Hand Driver Demo/Runtime/Scripts/Network.cs.meta
  18. 33
      Samples~/Hand Driver Demo/Runtime/Scripts/VibrationData.cs
  19. 11
      Samples~/Hand Driver Demo/Runtime/Scripts/VibrationData.cs.meta
  20. 2561
      Samples~/Hand Driver Demo/Scenes/Sample.unity
  21. 2
      Samples~/Hand Driver Demo/Scenes/Sample.unity.meta
  22. 580
      Samples~/Hand Driver Demo/Scenes/UdexrealSample.unity
  23. 4
      Samples~/Hand Driver Demo/_3rd/TouchSocket/TouchSocket.asmdef
  24. 7
      Samples~/Hand Driver Demo/_3rd/TouchSocket/TouchSocket.asmdef.meta

@ -0,0 +1,15 @@
{
"name": "HandDriverUPM.Runtime",
"references": [
"NaughtyAttributes",
"TouchSocket.Core"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
}

@ -1,5 +1,6 @@
{
"name": "NaughtyAttributes.Core",
"rootNamespace": "",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
@ -8,5 +9,6 @@
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
"versionDefines": [],
"noEngineReferences": false
}

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d0c2d958793f3a845b7527415f1bed20
guid: 06420257790fc9846bbee56a7c878406
folderAsset: yes
DefaultImporter:
externalObjects: {}

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 083ca0b62ed8e7946ab41137fa38c29f
guid: a97fe72600649684182927a02e1194f7
PrefabImporter:
externalObjects: {}
userData:

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e09785878aebc8240a376af4e7352916
guid: 53ed27d046c70d24a98ab03e67b0f23d
PrefabImporter:
externalObjects: {}
userData:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6200c81c54c9c6048b548363ab35bf3d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,7 @@
{
"name": "HandDriver.Runtime",
"references": [
"TouchSocket",
"NaughtyAttributes.Core"
]
}

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ae103f7d349d1d94e86ba5c8afbc8a44
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca9f7a4701b0fa14d88c58c3b79ab9de
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,698 @@
using NaughtyAttributes;
using System.Collections.Generic;
using TouchSocket.Core;
using UnityEngine;
public class HandDriver : MonoBehaviour
{
public Network Network;
public enum HandType
{
Left,
Right
}
public enum Axis
{
x,
y,
z,
x_n,
y_n,
z_n
}
public string CharacterName = string.Empty;
public HandType Hand;
private Dictionary<string, Quaternion> _originQuaternionDic;
public Transform Thumb1;
public Transform Thumb2;
public Transform Thumb3;
public Transform Index1;
public Transform Index2;
public Transform Index3;
public Transform Middle1;
public Transform Middle2;
public Transform Middle3;
public Transform Ring1;
public Transform Ring2;
public Transform Ring3;
public Transform Pinky1;
public Transform Pinky2;
public Transform Pinky3;
public Transform Wrist;
[Header("[Axis OffSet]")]
public Axis Pitch = Axis.x;
public Axis Roll = Axis.y;
public Axis Yaw = Axis.z;
[Header("[IMU(On/Off)]")] public bool HasIMU = false;
[Header("[Thumb Root Coefficient]")] [Range(0, 1)] public float coefficient = 0.6f;
[Header("[Thumb Root OffSet]")] public Vector3 Thumb1Offset;
[Header("[App Options]")]
public bool NeedRealTransfrom;
//[HideInInspector]
public bool UsingNetwork;
public bool UsingAndroidService;
[Header("[Vector3 Angles]")]
public Vector3 thumb1;
public Vector3 thumb2;
public Vector3 thumb3;
public Vector3 index1;
public Vector3 index2;
public Vector3 index3;
public Vector3 middle1;
public Vector3 middle2;
public Vector3 middle3;
public Vector3 ring1;
public Vector3 ring2;
public Vector3 ring3;
public Vector3 pinky1;
public Vector3 pinky2;
public Vector3 pinky3;
[Header("[Controller Values]")]
public float Joy_X;
public float Joy_Y;
public bool Button_A;
public bool Button_B;
public bool Button_Joystick;
public bool Button_Menu;
public InputData inputData = new();
[Header("[Vibration Control]")]
public string SendBackIP;
public VibrationData vibrationData;
[BoxGroup("Vibrator 1"), Min(0), Label("Million Second")]
public int Duration1 = 20;
[BoxGroup("Vibrator 1"), Range(4, 10)]
public int Amplitude1 = 4;
[Button]
public void Vibrator_1Active()
{
if (Network == null) return;
SingleVirbator[] Virbators;
if (Hand == HandType.Left)
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(1, Duration1, Amplitude1),
new SingleVirbator()
};
vibrationData = new VibrationData(Virbators);
}
else
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(),
new SingleVirbator(1, Duration1, Amplitude1),
};
vibrationData = new VibrationData(Virbators);
}
Network.SendVibrationMsg(CharacterName, SendBackIP, vibrationData);
}
[BoxGroup("Vibrator 2"), Min(0), Label("Million Second")]
public int Duration2 = 20;
[BoxGroup("Vibrator 2"), Range(4, 10)]
public int Amplitude2 = 4;
[Button]
public void Vibrator_2Active()
{
if (Network == null) return;
SingleVirbator[] Virbators;
if (Hand == HandType.Left)
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(2, Duration2, Amplitude2),
new SingleVirbator()
};
vibrationData = new VibrationData(Virbators);
}
else
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(),
new SingleVirbator(2, Duration2, Amplitude2),
};
vibrationData = new VibrationData(Virbators);
}
Network.SendVibrationMsg(CharacterName, SendBackIP, vibrationData);
}
[Button]
public void BothActiveWithVibrator_1Parameters()
{
if (Network == null) return;
SingleVirbator[] Virbators;
if (Hand == HandType.Left)
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(3, Duration1, Amplitude1),
new SingleVirbator()
};
vibrationData = new VibrationData(Virbators);
}
else
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(),
new SingleVirbator(3, Duration1, Amplitude1),
};
vibrationData = new VibrationData(Virbators);
}
Network.SendVibrationMsg(CharacterName, SendBackIP, vibrationData);
}
// Start is called before the first frame update
void Start()
{
if (GameObject.Find("Network") == null && (UsingAndroidService || UsingNetwork))
{
GameObject network = new GameObject("Network");
network.AddComponent<Network>();
Network = GameObject.Find("Network").GetComponent<Network>();
}
else if (UsingAndroidService || UsingNetwork)
{
Network = GameObject.Find("Network").GetComponent<Network>();
}
_originQuaternionDic = new Dictionary<string, Quaternion>();
InitJoints();
if (string.IsNullOrEmpty(SendBackIP) || UsingAndroidService)
{
SendBackIP = "127.0.0.1";
}
var Virbators = new SingleVirbator[2]
{
new SingleVirbator(0, 0, 1),
new SingleVirbator(0, 0, 1)
};
vibrationData = new VibrationData(Virbators);
if(UsingAndroidService)
{
CharacterName = "AndroidService";
}
}
private void InitJoints()
{
_originQuaternionDic.AddOrUpdate(Thumb1.name, Thumb1.localRotation);
_originQuaternionDic.AddOrUpdate(Thumb2.name, Thumb2.localRotation);
_originQuaternionDic.AddOrUpdate(Thumb3.name, Thumb3.localRotation);
_originQuaternionDic.AddOrUpdate(Index1.name, Index1.localRotation);
_originQuaternionDic.AddOrUpdate(Index2.name, Index2.localRotation);
_originQuaternionDic.AddOrUpdate(Index3.name, Index3.localRotation);
_originQuaternionDic.AddOrUpdate(Middle1.name, Middle1.localRotation);
_originQuaternionDic.AddOrUpdate(Middle2.name, Middle2.localRotation);
_originQuaternionDic.AddOrUpdate(Middle3.name, Middle3.localRotation);
_originQuaternionDic.AddOrUpdate(Ring1.name, Ring1.localRotation);
_originQuaternionDic.AddOrUpdate(Ring2.name, Ring2.localRotation);
_originQuaternionDic.AddOrUpdate(Ring3.name, Ring3.localRotation);
_originQuaternionDic.AddOrUpdate(Pinky1.name, Pinky1.localRotation);
_originQuaternionDic.AddOrUpdate(Pinky2.name, Pinky2.localRotation);
_originQuaternionDic.AddOrUpdate(Pinky3.name, Pinky3.localRotation);
_originQuaternionDic.AddOrUpdate(Wrist.name, Wrist.localRotation);
}
private void Rotate(Transform tran, float angle, Axis angleType)
{
if (!NeedRealTransfrom) return;
float angleX = 0;
float angleY = 0;
float angleZ = 0;
switch (angleType)
{
case Axis.x_n:
angleX = -angle;
break;
case Axis.y_n:
angleY = -angle;
break;
case Axis.z_n:
angleZ = -angle;
break;
case Axis.x:
angleX = angle;
break;
case Axis.y:
angleY = angle;
break;
case Axis.z:
angleZ = angle;
break;
}
tran.Rotate(angleX, angleY, angleZ);
}
private Vector3 ConvertAngleToVec3(Vector3 current, float angle, Axis angleType)
{
float angleX = 0;
float angleY = 0;
float angleZ = 0;
switch (angleType)
{
case Axis.x_n:
angleX = -angle;
break;
case Axis.y_n:
angleY = -angle;
break;
case Axis.z_n:
angleZ = -angle;
break;
case Axis.x:
angleX = angle;
break;
case Axis.y:
angleY = angle;
break;
case Axis.z:
angleZ = angle;
break;
}
return current + new Vector3(angleX, angleY, angleZ);
}
private void ResetRotation(Transform trans)
{
if (_originQuaternionDic.TryGetValue(trans.name, out Quaternion rot))
{
trans.localRotation = rot;
}
}
public void GetVec3Value(Vector3[] value)
{
thumb1 = value[0];
thumb2 = value[1];
thumb3 = value[2];
index1 = value[3];
index2 = value[4];
index3 = value[5];
middle1 = value[6];
middle2 = value[7];
middle3 = value[8];
ring1 = value[9];
ring2 = value[10];
ring3 = value[11];
pinky1 = value[12];
pinky2 = value[13];
pinky3 = value[14];
}
// Update is called once per frame
void Update()
{
if (UsingNetwork || UsingAndroidService)
{
UpdateThumb();
UpdateIndex();
UpdateMiddle();
UpdateRing();
UpdatePinky();
UpdateWrist();
UpdateController();
}
}
private void UpdateWrist()
{
if (HasIMU)
{
if (Hand == HandType.Left)
{
Quaternion quat_r = new Quaternion(
Network.Convert2Angle(CharacterName, "l26"),//x
Network.Convert2Angle(CharacterName, "l25"),//y
Network.Convert2Angle(CharacterName, "l27"),//z
Network.Convert2Angle(CharacterName, "l24"));//w
ResetRotation(Wrist);
quat_r = ConvertQuaternion(quat_r);
Wrist.rotation = quat_r;
}
else
{
Quaternion quat_r = new Quaternion(Network.Convert2Angle(CharacterName, "r26"),
Network.Convert2Angle(CharacterName, "r25"),
Network.Convert2Angle(CharacterName, "r27"), Network.Convert2Angle(CharacterName, "r24"));
ResetRotation(Wrist);
quat_r = ConvertQuaternion(quat_r);
Wrist.rotation = quat_r;
}
}
}
private void UpdateController()
{
if (Hand == HandType.Left)
{
Joy_X = Network.Convert2Angle(CharacterName, "l_joyX");
Joy_Y = Network.Convert2Angle(CharacterName, "l_joyY");
Button_A = Network.Convert2Bool(CharacterName, "l_aButton");
Button_B = Network.Convert2Bool(CharacterName, "l_bButton");
Button_Joystick = Network.Convert2Bool(CharacterName, "l_joyButton");
Button_Menu = Network.Convert2Bool(CharacterName, "l_menu");
inputData.joyX = Joy_X;
inputData.joyY = Joy_Y;
inputData.aButton = Button_A;
inputData.bButton = Button_B;
inputData.joyButton = Button_Joystick;
inputData.menu = Button_Menu;
}
else
{
Joy_X = Network.Convert2Angle(CharacterName, "r_joyX");
Joy_Y = Network.Convert2Angle(CharacterName, "r_joyY");
Button_A = Network.Convert2Bool(CharacterName, "r_aButton");
Button_B = Network.Convert2Bool(CharacterName, "r_bButton");
Button_Joystick = Network.Convert2Bool(CharacterName, "r_joyButton");
Button_Menu = Network.Convert2Bool(CharacterName, "r_menu");
inputData.joyX = Joy_X;
inputData.joyY = Joy_Y;
inputData.aButton = Button_A;
inputData.bButton = Button_B;
inputData.joyButton = Button_Joystick;
inputData.menu = Button_Menu;
}
}
//z轴朝上的右手坐标系 四元数 转换为 Y轴朝上的左手坐标系 四元数
private Quaternion ConvertQuaternion(Quaternion quat)
{
Quaternion quat_r = new Quaternion(quat.x, quat.y, quat.z, quat.w);
quat_r = Quaternion.Euler(quat_r.eulerAngles.z, -quat_r.eulerAngles.x, quat_r.eulerAngles.y);
return quat_r;
}
private void UpdateThumb()
{
if (NeedRealTransfrom)
{
ResetRotation(Thumb1);
ResetRotation(Thumb2);
ResetRotation(Thumb3);
}
if (Hand == HandType.Left)
{
var thumb3Pitch = Network.Convert2Angle(CharacterName, "l0");
var thumb2Pitch = Network.Convert2Angle(CharacterName, "l1");
var thumb1Pitch = Network.Convert2Angle(CharacterName, "l2") * coefficient + Thumb1Offset.y;
var thumb1Yaw = Network.Convert2Angle(CharacterName, "l3") + Thumb1Offset.z;
var thumb1Roll = Network.Convert2Angle(CharacterName, "l20") + Thumb1Offset.x;
thumb3 = ConvertAngleToVec3(Vector3.zero, thumb3Pitch, Pitch);
thumb2 = ConvertAngleToVec3(Vector3.zero, thumb2Pitch, Pitch);
thumb1 = ConvertAngleToVec3(Vector3.zero, thumb1Pitch, Pitch);
thumb1 = ConvertAngleToVec3(thumb1, thumb1Yaw, Yaw);
thumb1 = ConvertAngleToVec3(thumb1, thumb1Roll, Roll);
Rotate(Thumb3, thumb3Pitch, Pitch);
Rotate(Thumb2, thumb2Pitch, Pitch);
Rotate(Thumb1, thumb1Pitch, Pitch);
Rotate(Thumb1, thumb1Yaw, Yaw);
Rotate(Thumb1, thumb1Roll, Roll);
}
else
{
var thumb3Pitch = Network.Convert2Angle(CharacterName, "r0");
var thumb2Pitch = Network.Convert2Angle(CharacterName, "r1");
var thumb1Pitch = Network.Convert2Angle(CharacterName, "r2") * coefficient + Thumb1Offset.y;
var thumb1Yaw = Network.Convert2Angle(CharacterName, "r3") + Thumb1Offset.z;
var thumb1Roll = Network.Convert2Angle(CharacterName, "r20") + Thumb1Offset.x;
thumb3 = ConvertAngleToVec3(Vector3.zero, thumb3Pitch, Pitch);
thumb2 = ConvertAngleToVec3(Vector3.zero, thumb2Pitch, Pitch);
thumb1 = ConvertAngleToVec3(Vector3.zero, thumb1Pitch, Pitch);
thumb1 = ConvertAngleToVec3(thumb1, thumb1Yaw, Yaw);
thumb1 = ConvertAngleToVec3(thumb1, thumb1Roll, Roll);
Rotate(Thumb3, thumb3Pitch, Pitch);
Rotate(Thumb2, thumb2Pitch, Pitch);
Rotate(Thumb1, thumb1Pitch, Pitch);
Rotate(Thumb1, thumb1Yaw, Yaw);
Rotate(Thumb1, thumb1Roll, Roll);
}
}
private void UpdateIndex()
{
if (NeedRealTransfrom)
{
ResetRotation(Index1);
ResetRotation(Index2);
ResetRotation(Index3);
}
if (Hand == HandType.Left)
{
var index3Pitch = Network.Convert2Angle(CharacterName, "l4");
var index2Pitch = Network.Convert2Angle(CharacterName, "l5");
var index1Pitch = Network.Convert2Angle(CharacterName, "l6");
var index1Yaw = Network.Convert2Angle(CharacterName, "l7");
var index1Roll = Network.Convert2Angle(CharacterName, "l21");
index3 = ConvertAngleToVec3(Vector3.zero, index3Pitch, Pitch);
index2 = ConvertAngleToVec3(Vector3.zero, index2Pitch, Pitch);
index1 = ConvertAngleToVec3(Vector3.zero, index1Pitch, Pitch);
index1 = ConvertAngleToVec3(index1, index1Yaw, Yaw);
index1 = ConvertAngleToVec3(index1, index1Roll, Roll);
Rotate(Index3, index3Pitch, Pitch);
Rotate(Index2, index2Pitch, Pitch);
Rotate(Index1, index1Pitch, Pitch);
Rotate(Index1, index1Yaw, Yaw);
Rotate(Index1, index1Roll, Roll);
}
else
{
var index3Pitch = Network.Convert2Angle(CharacterName, "r4");
var index2Pitch = Network.Convert2Angle(CharacterName, "r5");
var index1Pitch = Network.Convert2Angle(CharacterName, "r6");
var index1Yaw = Network.Convert2Angle(CharacterName, "r7");
var index1Roll = Network.Convert2Angle(CharacterName, "r21");
index3 = ConvertAngleToVec3(Vector3.zero, index3Pitch, Pitch);
index2 = ConvertAngleToVec3(Vector3.zero, index2Pitch, Pitch);
index1 = ConvertAngleToVec3(Vector3.zero, index1Pitch, Pitch);
index1 = ConvertAngleToVec3(index1, index1Yaw, Yaw);
index1 = ConvertAngleToVec3(index1, index1Roll, Roll);
Rotate(Index3, index3Pitch, Pitch);
Rotate(Index2, index2Pitch, Pitch);
Rotate(Index1, index1Pitch, Pitch);
Rotate(Index1, index1Yaw, Yaw);
Rotate(Index1, index1Roll, Roll);
}
}
private void UpdateMiddle()
{
if (NeedRealTransfrom)
{
ResetRotation(Middle1);
ResetRotation(Middle2);
ResetRotation(Middle3);
}
if (Hand == HandType.Left)
{
var middle3Pitch = Network.Convert2Angle(CharacterName, "l8");
var middle2Pitch = Network.Convert2Angle(CharacterName, "l9");
var middle1Pitch = Network.Convert2Angle(CharacterName, "l10");
var middle1Yaw = Network.Convert2Angle(CharacterName, "l11");
middle3 = ConvertAngleToVec3(Vector3.zero, middle3Pitch, Pitch);
middle2 = ConvertAngleToVec3(Vector3.zero, middle2Pitch, Pitch);
middle1 = ConvertAngleToVec3(Vector3.zero, middle1Pitch, Pitch);
middle1 = ConvertAngleToVec3(middle1, middle1Yaw, Yaw);
Rotate(Middle3, middle3Pitch, Pitch);
Rotate(Middle2, middle2Pitch, Pitch);
Rotate(Middle1, middle1Pitch, Pitch);
Rotate(Middle1, middle1Yaw, Yaw);
}
else
{
var middle3Pitch = Network.Convert2Angle(CharacterName, "r8");
var middle2Pitch = Network.Convert2Angle(CharacterName, "r9");
var middle1Pitch = Network.Convert2Angle(CharacterName, "r10");
var middle1Yaw = Network.Convert2Angle(CharacterName, "r11");
middle3 = ConvertAngleToVec3(Vector3.zero, middle3Pitch, Pitch);
middle2 = ConvertAngleToVec3(Vector3.zero, middle2Pitch, Pitch);
middle1 = ConvertAngleToVec3(Vector3.zero, middle1Pitch, Pitch);
middle1 = ConvertAngleToVec3(middle1, middle1Yaw, Yaw);
Rotate(Middle3, middle3Pitch, Pitch);
Rotate(Middle2, middle2Pitch, Pitch);
Rotate(Middle1, middle1Pitch, Pitch);
Rotate(Middle1, middle1Yaw, Yaw);
}
}
private void UpdateRing()
{
if (NeedRealTransfrom)
{
ResetRotation(Ring1);
ResetRotation(Ring2);
ResetRotation(Ring3);
}
if (Hand == HandType.Left)
{
var ring3Pitch = Network.Convert2Angle(CharacterName, "l12");
var ring2Pitch = Network.Convert2Angle(CharacterName, "l13");
var ring1Pitch = Network.Convert2Angle(CharacterName, "l14");
var ring1Yaw = Network.Convert2Angle(CharacterName, "l15");
ring3 = ConvertAngleToVec3(Vector3.zero, ring3Pitch, Pitch);
ring2 = ConvertAngleToVec3(Vector3.zero, ring2Pitch, Pitch);
ring1 = ConvertAngleToVec3(Vector3.zero, ring1Pitch, Pitch);
ring1 = ConvertAngleToVec3(ring1, ring1Yaw, Yaw);
Rotate(Ring3, ring3Pitch, Pitch);
Rotate(Ring2, ring2Pitch, Pitch);
Rotate(Ring1, ring1Pitch, Pitch);
Rotate(Ring1, ring1Yaw, Yaw);
}
else
{
var ring3Pitch = Network.Convert2Angle(CharacterName, "r12");
var ring2Pitch = Network.Convert2Angle(CharacterName, "r13");
var ring1Pitch = Network.Convert2Angle(CharacterName, "r14");
var ring1Yaw = Network.Convert2Angle(CharacterName, "r15");
ring3 = ConvertAngleToVec3(Vector3.zero, ring3Pitch, Pitch);
ring2 = ConvertAngleToVec3(Vector3.zero, ring2Pitch, Pitch);
ring1 = ConvertAngleToVec3(Vector3.zero, ring1Pitch, Pitch);
ring1 = ConvertAngleToVec3(ring1, ring1Yaw, Yaw);
Rotate(Ring3, ring3Pitch, Pitch);
Rotate(Ring2, ring2Pitch, Pitch);
Rotate(Ring1, ring1Pitch, Pitch);
Rotate(Ring1, ring1Yaw, Yaw);
}
}
private void UpdatePinky()
{
if (NeedRealTransfrom)
{
ResetRotation(Pinky1);
ResetRotation(Pinky2);
ResetRotation(Pinky3);
}
if (Hand == HandType.Left)
{
var pinky3Pitch = Network.Convert2Angle(CharacterName, "l16");
var pinky2Pitch = Network.Convert2Angle(CharacterName, "l17");
var pinky1Pitch = Network.Convert2Angle(CharacterName, "l18");
var pinky1Yaw = Network.Convert2Angle(CharacterName, "l19");
var pinky1Roll = Network.Convert2Angle(CharacterName, "l22");
pinky3 = ConvertAngleToVec3(Vector3.zero, pinky3Pitch, Pitch);
pinky2 = ConvertAngleToVec3(Vector3.zero, pinky2Pitch, Pitch);
pinky1 = ConvertAngleToVec3(Vector3.zero, pinky1Pitch, Pitch);
pinky1 = ConvertAngleToVec3(pinky1, pinky1Yaw, Yaw);
pinky1 = ConvertAngleToVec3(pinky1, pinky1Roll, Roll);
Rotate(Pinky3, pinky3Pitch, Pitch);
Rotate(Pinky2, pinky2Pitch, Pitch);
Rotate(Pinky1, pinky1Pitch, Pitch);
Rotate(Pinky1, pinky1Yaw, Yaw);
Rotate(Pinky1, pinky1Roll, Roll);
}
else
{
var pinky3Pitch = Network.Convert2Angle(CharacterName, "r16");
var pinky2Pitch = Network.Convert2Angle(CharacterName, "r17");
var pinky1Pitch = Network.Convert2Angle(CharacterName, "r18");
var pinky1Yaw = Network.Convert2Angle(CharacterName, "r19");
var pinky1Roll = Network.Convert2Angle(CharacterName, "r22");
pinky3 = ConvertAngleToVec3(Vector3.zero, pinky3Pitch, Pitch);
pinky2 = ConvertAngleToVec3(Vector3.zero, pinky2Pitch, Pitch);
pinky1 = ConvertAngleToVec3(Vector3.zero, pinky1Pitch, Pitch);
pinky1 = ConvertAngleToVec3(pinky1, pinky1Yaw, Yaw);
pinky1 = ConvertAngleToVec3(pinky1, pinky1Roll, Roll);
Rotate(Pinky3, pinky3Pitch, Pitch);
Rotate(Pinky2, pinky2Pitch, Pitch);
Rotate(Pinky1, pinky1Pitch, Pitch);
Rotate(Pinky1, pinky1Yaw, Yaw);
Rotate(Pinky1, pinky1Roll, Roll);
}
}
public void ServiceVibrationControl(int VirbatorIndex = 1, int DurationSecond = 20, int Strength = 10)
{
if (Network == null || !UsingAndroidService) return;
SingleVirbator[] Virbators;
if (Hand == HandType.Left)
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(VirbatorIndex, DurationSecond, Strength),
new SingleVirbator()
};
vibrationData = new VibrationData(Virbators);
}
else
{
Virbators = new SingleVirbator[2]
{
new SingleVirbator(),
new SingleVirbator(VirbatorIndex, DurationSecond, Strength),
};
vibrationData = new VibrationData(Virbators);
}
Network.SendVibrationMsg("AndroidService", "127.0.0.1", vibrationData);
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ff3bfb33faef00d40880dd5952fd19e9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,35 @@
//Struct InputData is a struct that contains all of the button, finger, and linear inputs. This is what's sent to the driver via the named pipe.
public struct InputData
{
public float joyX; //range: -1 -> 1
public float joyY; //range: -1 -> 1
public bool joyButton;
public bool trgButton;
public bool aButton;
public bool bButton;
public bool grab;
//public bool pinch;
public bool menu;
//public bool calibrate;
public bool trackpad_touch;
public float trgValue; //range: 0 -> 1
//constructor that uses a 1d array for flexion.
public InputData(float joyX, float joyY, bool joyButton, bool trgButton,
bool aButton, bool bButton, bool grab, bool pinch, bool menu, bool calibrate, float trgValue,bool trackpad_touch)
{
this.joyX = joyX;
this.joyY = joyY;
this.joyButton = joyButton;
this.trgButton = trgButton;
this.aButton = aButton;
this.bButton = bButton;
this.grab = grab;
//this.pinch = pinch;
this.menu = menu;
//this.calibrate = calibrate;
this.trgValue = trgValue;
this.trackpad_touch = trackpad_touch;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 704298a683566b5449b0b21443685ded
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,207 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Net;
using System.Text;
using TouchSocket.Core;
using TouchSocket.Sockets;
using UnityEngine;
public class Network : MonoBehaviour
{
public int Port = 5555;
private UdpSession _udpClient;
private ConcurrentDictionary<string, ConcurrentDictionary<string, string>> _deviceReadMessages;
private StreamWriter writer;
private string _txtPath;
void Start()
{
_txtPath = Application.dataPath + "stream.data";
_deviceReadMessages = new ConcurrentDictionary<string, ConcurrentDictionary<string, string>>();
_udpClient = new UdpSession();
_udpClient.Received += ReceiveMsg;
_udpClient.Setup(new TouchSocketConfig()
.SetBindIPHost(new IPHost(Port))
.SetUdpDataHandlingAdapter(() => new NormalUdpDataHandlingAdapter()))
.Start();
Debug.Log("UDP Client Start!!");
}
private void WriteIntoTxt(string message)
{
FileInfo file = new FileInfo(_txtPath);
if (!file.Exists)
{
writer = file.CreateText();
}
else
{
writer = file.AppendText();
}
writer.WriteLine(message);
writer.Flush();
writer.Dispose();
writer.Close();
}
private void ReceiveMsg(EndPoint endpoint, ByteBlock byteblock, IRequestInfo requestinfo)
{
string msg = Encoding.UTF8.GetString(byteblock.Buffer, 0, byteblock.Len);
Debug.Log(msg);
//WriteIntoTxt(msg);
JObject obj = JObject.Parse(msg);
var jps = obj.Properties();
foreach (var jp in jps)
{
string role_name = jp.Name;
JToken token = obj.GetValue(role_name);
JArray array = token["Parameter"] as JArray;
ConcurrentDictionary<string, string> _deviceMsg = new ConcurrentDictionary<string, string>();
for (int i = 0; i < array.Count; i++)
{
JObject obj1 = array[i] as JObject;
string key = obj1.GetValue("Name").ToString();
string value = obj1.GetValue("Value").ToString();
_deviceMsg.TryAdd(key, value);
}
if (_deviceReadMessages.ContainsKey(role_name))
{
_deviceReadMessages[role_name] = _deviceMsg;
}
else
{
_deviceReadMessages.TryAdd(role_name, _deviceMsg);
}
}
//JToken token = obj.GetValue("Device1_"+Port);
//JArray array = token["Parameter"] as JArray;
//for (int i = 0; i < array.Count; i++)
//{
// JObject obj1 = array[i] as JObject;
// string key = obj1.GetValue("Name").ToString();
// string value = obj1.GetValue("Value").ToString();
// _device1ReadMessages.AddOrUpdate(key, value);
//}
//JToken token2 = obj.GetValue("Device2_"+Port);
//JArray array2 = token2["Parameter"] as JArray;
//for (int i = 0; i < array.Count; i++)
//{
// JObject obj1 = array2[i] as JObject;
// string key = obj1.GetValue("Name").ToString();
// string value = obj1.GetValue("Value").ToString();
// _device2ReadMessages.AddOrUpdate(key, value);
//}
}
// Update is called once per frame
void Update()
{
}
public float Convert2Angle(string role_name, string key)
{
float angle = 0;
if (!string.IsNullOrEmpty(role_name))
{
if (!_deviceReadMessages.ContainsKey(role_name))
{
return 0;
}
string str = _deviceReadMessages[role_name][key];
if (!string.IsNullOrEmpty(str))
{
angle = Single.Parse(str);
}
}
return angle;
}
public bool Convert2Bool(string role_name, string key)
{
bool flag = false;
if (!string.IsNullOrEmpty(role_name))
{
if (!_deviceReadMessages.ContainsKey(role_name))
{
return false;
}
string str = _deviceReadMessages[role_name][key];
if (!string.IsNullOrEmpty(str))
{
flag = bool.Parse(str);
}
}
return flag;
}
public void SendVibrationMsg(string RoleName, string IP, VibrationData data)
{
var json_role = new JObject();
var json_one = new JObject();
var parameterArrayLeft = new JArray();
var parameterArrayRight = new JArray();
var _Lpara_active = new JObject();
_Lpara_active.Add("Name", "Vibrators");
_Lpara_active.Add("Value", data.Virbators[0].ActiveCommand);
var _Lpara_duration = new JObject();
_Lpara_duration.Add("Name", "Duration");
_Lpara_duration.Add("Value", data.Virbators[0].Duration);
var _Lpara_amplitude = new JObject();
_Lpara_amplitude.Add("Name", "Amplitude");
_Lpara_amplitude.Add("Value", data.Virbators[0].Amplitude);
parameterArrayLeft.Add(_Lpara_active);
parameterArrayLeft.Add(_Lpara_duration);
parameterArrayLeft.Add(_Lpara_amplitude);
var _Rpara_active = new JObject();
_Rpara_active.Add("Name", "Vibrators");
_Rpara_active.Add("Value", data.Virbators[1].ActiveCommand);
var _Rpara_duration = new JObject();
_Rpara_duration.Add("Name", "Duration");
_Rpara_duration.Add("Value", data.Virbators[1].Duration);
var _Rpara_amplitude = new JObject();
_Rpara_amplitude.Add("Name", "Amplitude");
_Rpara_amplitude.Add("Value", data.Virbators[1].Amplitude);
parameterArrayRight.Add(_Rpara_active);
parameterArrayRight.Add(_Rpara_duration);
parameterArrayRight.Add(_Rpara_amplitude);
json_one.Add("LeftHand", parameterArrayLeft);
json_one.Add("RightHand", parameterArrayRight);
json_role.Add(RoleName, json_one);
Debug.Log(json_role.ToJson());
_udpClient.Send(new IPEndPoint(IPAddress.Parse(IP), 8920), Encoding.UTF8.GetBytes(json_role.ToJson()));
}
private void OnDestroy()
{
_udpClient.Received -= ReceiveMsg;
_udpClient.Stop();
_udpClient.Dispose();
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d694a138ada737547be655b517ff143b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,33 @@
public struct SingleVirbator
{
public int ActiveCommand;
public int Duration;
public int Amplitude;
public SingleVirbator(int command = 1, int duration = 0, int amplitude = 4)
{
command = command < 1 ? 1 : command > 3 ? 3 : command;
duration = duration < 0 ? 0 : duration;
amplitude = amplitude < 4 ? 4 : amplitude > 10 ? 10 : amplitude;
ActiveCommand = command;
Duration = duration;
Amplitude = amplitude;
}
}
public class VibrationData
{
public SingleVirbator[] Virbators = new SingleVirbator[2];
public VibrationData(SingleVirbator[] virbators)
{
if (virbators.Length != 2) return;
for (int i = 0; i < virbators.Length; i++)
{
Virbators[i] = virbators[i];
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1fe0a761cd51ae048b2fd88ac356edf4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 56af6e64aaf4adc41acdc362ddb2f83c
guid: c9b621f62f7be4c42a90d1971e952711
DefaultImporter:
externalObjects: {}
userData:

@ -1,580 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 705507994}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &178908012
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 178908015}
- component: {fileID: 178908014}
- component: {fileID: 178908013}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &178908013
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 178908012}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &178908014
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 178908012}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &178908015
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 178908012}
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: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &705507993
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 705507995}
- component: {fileID: 705507994}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &705507994
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 705507993}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 1
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &705507995
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 705507993}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 963194228}
- component: {fileID: 963194227}
- component: {fileID: 963194226}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &963194226
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
--- !u!20 &963194227
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
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_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.12
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &963194228
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: 0.2588191, y: 0, z: 0, w: 0.9659258}
m_LocalPosition: {x: 0, y: 0.224, z: -0.1927}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 30, y: 0, z: 0}
--- !u!1 &1669286643
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1669286644}
- component: {fileID: 1669286645}
m_Layer: 0
m_Name: Network
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1669286644
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1669286643}
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: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1669286645
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1669286643}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d694a138ada737547be655b517ff143b, type: 3}
m_Name:
m_EditorClassIdentifier:
Port: 5555
--- !u!1001 &5072409605434321392
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 7268218674378355239}
m_Modifications:
- target: {fileID: 891784673809029323, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_Name
value: LeftHand
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalPosition.x
value: -0.1
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4553664730006745444, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
propertyPath: Network
value:
objectReference: {fileID: 1669286645}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
--- !u!1001 &5525122480644792609
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 7268218674378355239}
m_Modifications:
- target: {fileID: 588452240933294981, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_Name
value: RightHand
objectReference: {fileID: 0}
- target: {fileID: 1445693180675954172, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: Network
value:
objectReference: {fileID: 1669286645}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalPosition.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e09785878aebc8240a376af4e7352916, type: 3}
--- !u!4 &7026629995582796419 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3255741203471831970, guid: e09785878aebc8240a376af4e7352916, type: 3}
m_PrefabInstance: {fileID: 5525122480644792609}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7268218674378355236
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7268218674378355239}
m_Layer: 0
m_Name: Interactions Hands
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7268218674378355239
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7268218674378355236}
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: 8694312561512733603}
- {fileID: 7026629995582796419}
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &8694312561512733603 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4525192509350998611, guid: 083ca0b62ed8e7946ab41137fa38c29f, type: 3}
m_PrefabInstance: {fileID: 5072409605434321392}
m_PrefabAsset: {fileID: 0}

@ -0,0 +1,4 @@
{
"name": "TouchSocket",
"autoReferenced": true
}

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3488284a57c44104fb4c0ff2a3153081
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save