1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-11-27 20:40:48 +01:00
locker bug
mp haptic bug
mp hand size bug
mp endcode bug
mp decode bug
This commit is contained in:
xpeng 2022-08-26 22:06:45 +02:00
parent effb639e86
commit d00d192af5
17 changed files with 130 additions and 118 deletions

View File

@ -1552,6 +1552,8 @@ MonoBehaviour:
HandPositionY: 0
HandPositionZ: 0
Sliders: []
Locker: {fileID: 0}
NVRManager: {fileID: 0}
--- !u!1 &149481173433458732
GameObject:
m_ObjectHideFlags: 0

View File

@ -123,7 +123,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 149481172096803369}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df2868252ab5c4d1da357e8f11f1b524, type: 3}
m_Name:
@ -171,7 +171,7 @@ GameObject:
- component: {fileID: 149481172127065659}
- component: {fileID: 149481172127065663}
- component: {fileID: 4540214490382732089}
- component: {fileID: 3587797900279830793}
- component: {fileID: 2613443299298391039}
m_Layer: 0
m_Name: LHand
m_TagString: Untagged
@ -280,7 +280,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 149481172127065656}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df2868252ab5c4d1da357e8f11f1b524, type: 3}
m_Name:
@ -299,7 +299,7 @@ MonoBehaviour:
ScaleThreshold: 0.005
InLocalSpace: 0
Interpolate: 0
--- !u!114 &3587797900279830793
--- !u!114 &2613443299298391039
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

View File

@ -235,6 +235,89 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6649868}
m_Mesh: {fileID: 5584831760448572050, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5, type: 3}
--- !u!1 &13422699
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 13422700}
- component: {fileID: 13422702}
- component: {fileID: 13422701}
m_Layer: 0
m_Name: Display P1 (1)
m_TagString: DisplayP1
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 1
m_IsActive: 1
--- !u!4 &13422700
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13422699}
m_LocalRotation: {x: -0.8196523, y: 0, z: 0, w: 0.57286143}
m_LocalPosition: {x: 0.5110072, y: 1.4265, z: 0.0654}
m_LocalScale: {x: 102.49999, y: 102.475494, z: 102.475494}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 1775131856}
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: -110.1, y: 0, z: 0}
--- !u!23 &13422701
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13422699}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: fa661e697a9d4dd4aa3938d314e10626, 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: 2
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 &13422702
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13422699}
m_Mesh: {fileID: 512255582399057887, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5, type: 3}
--- !u!1 &14570952
GameObject:
m_ObjectHideFlags: 0
@ -24336,6 +24419,16 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1486532002687246983, guid: e2d99f1c1f1e9c54c9115c9697ecf165,
type: 3}
propertyPath: Locker
value:
objectReference: {fileID: 2062235792}
- target: {fileID: 1486532002687246983, guid: e2d99f1c1f1e9c54c9115c9697ecf165,
type: 3}
propertyPath: NVRManager
value:
objectReference: {fileID: 1880181387}
- target: {fileID: 1486532002687246983, guid: e2d99f1c1f1e9c54c9115c9697ecf165,
type: 3}
propertyPath: Sliders.Array.size
@ -24652,7 +24745,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2fdacb8f22ff5f541aa267f392efe949, type: 3}
m_Name:
m_EditorClassIdentifier:
Delay: 1
Delay: 2
buttons:
- {fileID: 1839061753}
- {fileID: 1312793477}
@ -24788,7 +24881,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6c150c011a6544b4b8054bba7ee5e5ca, type: 3}
m_Name:
m_EditorClassIdentifier:
searchTiming_: 2
searchTiming_: 0
type_: 0
altTabWindow_: 0
createChildWindows_: 0

View File

@ -25,7 +25,7 @@ public class Locker : MonoBehaviour
{
ToggleButtons();
ToggleLocalmotion();
ToggleRay();
//ToggleRay();
isLocked = !isLocked;
if (isLocked)
material.color = Color.red;

View File

@ -16,7 +16,8 @@ public class PlayerSettingManager : MonoBehaviour
public float HandPositionY = 0;
public float HandPositionZ = 0;
public List<Slider> Sliders;
public Locker Locker;
public NoneVRSettingManager NVRManager;
void Start()
{
SetTarget(gameObject);
@ -27,7 +28,10 @@ public class PlayerSettingManager : MonoBehaviour
LHandTransform = XRObj.transform.Find("Camera Offset").Find("LeftHand Controller").Find("LHand");
RHandTransform = XRObj.transform.Find("Camera Offset").Find("RightHand Controller").Find("RHand");
PlayerTransform = XRObj.transform;
HapticManagers = GetComponentsInChildren<ControllerHapticManager>();
HapticManagers = XRObj.GetComponentsInChildren<ControllerHapticManager>();
Locker.LocalMotion = XRObj;
NVRManager.NVRCameraTargetFP = XRObj.transform.Find("Camera Offset").Find("Main Camera");
NVRManager.GetNVRMode();
GetSetConfigs();
}
private void GetSetConfigs()

View File

@ -6,8 +6,8 @@ public class ControllerHapticManager : MonoBehaviour
{
public XRNode Hand;
InputDevice device;
public float duration;
public float amplitude;
public float duration = 0.1f;
public float amplitude = 1f;
private void OnTriggerEnter(Collider other)
{
device = InputDevices.GetDeviceAtXRNode(Hand);
@ -18,4 +18,8 @@ public class ControllerHapticManager : MonoBehaviour
device = InputDevices.GetDeviceAtXRNode(Hand);
device.StopHaptics();
}
void Uppdate()
{
}
}

View File

@ -19,7 +19,7 @@ public class DisplaySync : NetworkBehaviour
public uint timeout = 100;
Assembler assembler = new Assembler();
bool isInitialized = false;
void Start()
public override void OnNetworkSpawn()
{
NetworkManager.Singleton.OnClientDisconnectCallback += OnClientDisconnectedCallback;
@ -41,6 +41,7 @@ public class DisplaySync : NetworkBehaviour
Encoder.encoder.onEncoded.AddListener(OnEncoded);
}
}
void Update()
{

View File

@ -28,7 +28,7 @@ public class WindowEncoder : NetworkBehaviour
public int ResolutionDivider = 2;
Texture2D sTexture;
void Start()
public override void OnNetworkSpawn()
{
if (!IsOwner) return;
GetSetting();
@ -48,6 +48,7 @@ public class WindowEncoder : NetworkBehaviour
var _setting = JsonConfig.GetJObject("EncoderSetting");
ResolutionDivider = _setting.Value<int>("ResolutionDivider");
_setting.Remove("ResolutionDivider");
_setting["format"] = (int)uNvEncoder.Format.B8G8R8A8_UNORM;
setting = _setting.ToObject<uNvEncoder.EncoderDesc>();
}

View File

@ -15,7 +15,7 @@ public class NetworkPlayer : NetworkBehaviour
private void DisableClientInput()
{
if (!IsOwner && IsClient)
if (!IsOwner)
{
var clientMoveProvider = GetComponent<ActionBasedContinuousMoveProvider>();
var clientTurnProvider = GetComponent<ActionBasedContinuousTurnProvider>();
@ -43,7 +43,7 @@ public class NetworkPlayer : NetworkBehaviour
}
foreach (var haptic in clientHaptics)
{
haptic.enabled = false;
Destroy(haptic);
}
clientLIV.enabled = false;
//clientOVRManager.SetActive(false);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f44b1ed140e7104439a23e290bf6ed3f
guid: 1be2e053bc7b1e14d83c6d345916cc9a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@ -1,98 +0,0 @@
fileFormatVersion: 2
guid: 6660365cd3c564f4582541b1cf6cce84
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
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: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -8,7 +8,7 @@
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.vscode": "1.2.5",
"com.unity.multiplayer.samples.coop": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#main",
"com.unity.netcode.gameobjects": "1.0.0",
"com.unity.netcode.gameobjects": "1.0.1",
"com.unity.render-pipelines.universal": "12.1.7",
"com.unity.test-framework": "2.0.1-pre.18",
"com.unity.textmeshpro": "3.0.6",

View File

@ -138,12 +138,12 @@
"url": "https://packages.unity.com"
},
"com.unity.netcode.gameobjects": {
"version": "1.0.0",
"version": "1.0.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.nuget.mono-cecil": "1.10.1",
"com.unity.transport": "1.1.0"
"com.unity.transport": "1.2.0"
},
"url": "https://packages.unity.com"
},
@ -312,7 +312,7 @@
"url": "https://packages.unity.com"
},
"com.unity.transport": {
"version": "1.1.0",
"version": "1.2.0",
"depth": 1,
"source": "registry",
"dependencies": {

View File

@ -189,6 +189,11 @@ PlayerSettings:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: -6018045015233401694, guid: 3999ab811e936714280a476b3a032d86, type: 2}
- {fileID: 6536100391545742739, guid: 55d1ec7a4296de343b6d3bb6f9a19731, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1