1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-11-24 03:50:10 +01:00

add custom bitrate etc.; fix bugs; add assembly definitions

This commit is contained in:
xpeng 2022-08-25 23:31:20 +02:00
parent 13c18c8fc2
commit 8a733d54d7
36 changed files with 444 additions and 256 deletions

View File

@ -141,7 +141,7 @@ MonoBehaviour:
RotAngleThreshold: 0.01
ScaleThreshold: 0.005
InLocalSpace: 0
Interpolate: 1
Interpolate: 0
--- !u!114 &4318516477145814445
MonoBehaviour:
m_ObjectHideFlags: 0
@ -154,7 +154,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 901c50071db1c3f4fb9f655e0daeb979, type: 3}
m_Name:
m_EditorClassIdentifier:
Hand: 0
Hand: 5
duration: 0.1
amplitude: 1
--- !u!1 &149481172127065656
@ -298,7 +298,7 @@ MonoBehaviour:
RotAngleThreshold: 0.01
ScaleThreshold: 0.005
InLocalSpace: 0
Interpolate: 1
Interpolate: 0
--- !u!114 &3587797900279830793
MonoBehaviour:
m_ObjectHideFlags: 0
@ -311,7 +311,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 901c50071db1c3f4fb9f655e0daeb979, type: 3}
m_Name:
m_EditorClassIdentifier:
Hand: 0
Hand: 4
duration: 0.1
amplitude: 1
--- !u!1 &149481173032254467
@ -1741,13 +1741,11 @@ MonoBehaviour:
width: 1920
height: 1080
frameRate: 24
bitRate: 98304
maxFrameSize: 4096
bitRate: 196608
maxFrameSize: 8192
format: 87
idrFrameIntervalFrame: 24
ResolutionDivider: 2
sTexture: {fileID: 0}
ResizeShader: {fileID: 0}
--- !u!1 &149481173433458732
GameObject:
m_ObjectHideFlags: 0

View File

@ -888,37 +888,6 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_IsOn: 1
--- !u!1 &87509939
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 87509942}
m_Layer: 0
m_Name: Test
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &87509942
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 87509939}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.5159848, y: 1.8461566, z: 1.1951983}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &96262323
GameObject:
m_ObjectHideFlags: 0
@ -5384,7 +5353,7 @@ MonoBehaviour:
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
TickRate: 30
TickRate: 45
ClientConnectionBufferTimeout: 10
ConnectionApproval: 0
ConnectionData:
@ -5428,8 +5397,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
Port: 7777
Address: 127.0.0.1
MaxClients: 100
MessageBufferSize: 51200
MaxClients: 2
MessageBufferSize: 20480
PingInterval: 500
TimeoutLimit: 32
TimeoutMinimum: 5000
@ -6271,27 +6240,6 @@ MeshCollider:
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: -6013271257732972647, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5, type: 3}
--- !u!1 &626497446 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 149481172096803369, guid: e2d99f1c1f1e9c54c9115c9697ecf165,
type: 3}
m_PrefabInstance: {fileID: 2035566383}
m_PrefabAsset: {fileID: 0}
--- !u!114 &626497448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 626497446}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 901c50071db1c3f4fb9f655e0daeb979, type: 3}
m_Name:
m_EditorClassIdentifier:
Hand: 5
duration: 0.1
amplitude: 1
--- !u!108 &637424750 stripped
Light:
m_CorrespondingSourceObject: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
@ -7103,6 +7051,11 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -9137110160713597164, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -9129991538565115585, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_StaticEditorFlags
@ -7283,6 +7236,11 @@ PrefabInstance:
propertyPath: m_StaticEditorFlags
value: 127
objectReference: {fileID: 0}
- target: {fileID: -7612022668796144720, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -7506547922934649309, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Enabled
@ -7291,7 +7249,7 @@ PrefabInstance:
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.45
value: 1
objectReference: {fileID: 0}
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7321,7 +7279,7 @@ PrefabInstance:
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_SpotAngle
value: 178.99998
value: 179
objectReference: {fileID: 0}
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7331,7 +7289,7 @@ PrefabInstance:
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 178.99998
value: 144.99
objectReference: {fileID: 0}
- target: {fileID: -7502872840139380679, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7476,7 +7434,7 @@ PrefabInstance:
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7486,17 +7444,17 @@ PrefabInstance:
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7506,7 +7464,7 @@ PrefabInstance:
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7521,7 +7479,7 @@ PrefabInstance:
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4451172175426913847, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7633,6 +7591,11 @@ PrefabInstance:
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: -2558637739133746411, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -2469457828685113177, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_StaticEditorFlags
@ -7651,7 +7614,7 @@ PrefabInstance:
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7661,17 +7624,17 @@ PrefabInstance:
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7681,7 +7644,7 @@ PrefabInstance:
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7696,7 +7659,7 @@ PrefabInstance:
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2203698255111334344, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7743,6 +7706,21 @@ PrefabInstance:
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: -1125379421861928946, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalScale.x
value: 108
objectReference: {fileID: 0}
- target: {fileID: -1125379421861928946, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalScale.y
value: 108
objectReference: {fileID: 0}
- target: {fileID: -1125379421861928946, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalScale.z
value: 108
objectReference: {fileID: 0}
- target: {fileID: -1125379421861928946, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalPosition.y
@ -7753,6 +7731,11 @@ PrefabInstance:
propertyPath: m_LocalPosition.z
value: 0.18
objectReference: {fileID: 0}
- target: {fileID: -1125379421861928946, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: -1111671922073484731, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Enabled
@ -7781,12 +7764,12 @@ PrefabInstance:
- target: {fileID: -717511211058055674, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.425
value: 1.427
objectReference: {fileID: 0}
- target: {fileID: -717511211058055674, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.0706
value: 0.07
objectReference: {fileID: 0}
- target: {fileID: -380595139111555720, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7856,12 +7839,12 @@ PrefabInstance:
- target: {fileID: 795547410136657018, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.4258
value: 1.4265
objectReference: {fileID: 0}
- target: {fileID: 795547410136657018, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.0699
value: 0.0696
objectReference: {fileID: 0}
- target: {fileID: 850468428025529609, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -7908,11 +7891,21 @@ PrefabInstance:
propertyPath: m_StaticShadowCaster
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1829845788910486492, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1934241770056242486, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 1951971408918261799, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1995990277796536632, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_IsActive
@ -8013,6 +8006,11 @@ PrefabInstance:
propertyPath: m_StaticEditorFlags
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3185127085289544906, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3315583283299381734, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_StaticEditorFlags
@ -8026,7 +8024,7 @@ PrefabInstance:
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8036,17 +8034,17 @@ PrefabInstance:
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8056,7 +8054,7 @@ PrefabInstance:
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8071,7 +8069,7 @@ PrefabInstance:
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3620894044627765768, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8101,7 +8099,7 @@ PrefabInstance:
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8111,17 +8109,17 @@ PrefabInstance:
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8131,7 +8129,7 @@ PrefabInstance:
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8146,7 +8144,7 @@ PrefabInstance:
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3670431835190123096, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8181,7 +8179,7 @@ PrefabInstance:
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8191,17 +8189,17 @@ PrefabInstance:
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8211,7 +8209,7 @@ PrefabInstance:
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8226,7 +8224,7 @@ PrefabInstance:
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4132902690819570063, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8286,7 +8284,7 @@ PrefabInstance:
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8296,17 +8294,17 @@ PrefabInstance:
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8316,7 +8314,7 @@ PrefabInstance:
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8331,7 +8329,7 @@ PrefabInstance:
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4767517393324885255, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8361,7 +8359,7 @@ PrefabInstance:
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8371,17 +8369,17 @@ PrefabInstance:
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8391,7 +8389,7 @@ PrefabInstance:
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8406,7 +8404,7 @@ PrefabInstance:
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5001624643165187281, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8448,6 +8446,11 @@ PrefabInstance:
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 5433584861403218335, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5570520766955470143, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_StaticEditorFlags
@ -8496,7 +8499,7 @@ PrefabInstance:
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Range
value: 0.15
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8506,17 +8509,17 @@ PrefabInstance:
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.b
value: 0.44
value: 0.92549026
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.g
value: 0.31533334
value: 0.6431373
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Color.r
value: 0.14116666
value: 0.25490198
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8526,7 +8529,7 @@ PrefabInstance:
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Intensity
value: 0.05
value: 0.015
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8541,7 +8544,7 @@ PrefabInstance:
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_InnerSpotAngle
value: 159.78027
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6281326113585270073, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
@ -8578,6 +8581,11 @@ PrefabInstance:
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6721905813968733938, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6783775549627316552, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5,
type: 3}
propertyPath: m_Enabled
@ -13603,27 +13611,6 @@ MeshCollider:
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 5584831760448572050, guid: 4cbf0dbca1ca1a5499c4b7806ab6aac5, type: 3}
--- !u!1 &1240609297 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 149481172127065656, guid: e2d99f1c1f1e9c54c9115c9697ecf165,
type: 3}
m_PrefabInstance: {fileID: 2035566383}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1240609299
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1240609297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 901c50071db1c3f4fb9f655e0daeb979, type: 3}
m_Name:
m_EditorClassIdentifier:
Hand: 4
duration: 0.1
amplitude: 1
--- !u!1 &1241561949
GameObject:
m_ObjectHideFlags: 0
@ -16024,7 +16011,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963757693}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 78ff908a2776a034e9792518f4c6da70, type: 3}
m_Name:
@ -16037,7 +16024,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963757693}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fd03e427cccae6341afca0ae448e2ec0, type: 3}
m_Name:
@ -16046,6 +16033,20 @@ MonoBehaviour:
height: 640
codec: 0
format: 0
--- !u!114 &1390826968
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963757693}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c14a4626e6ec6b14a9af7661c78f78ff, type: 3}
m_Name:
m_EditorClassIdentifier:
IdleTexture: {fileID: 2800000, guid: 6660365cd3c564f4582541b1cf6cce84, type: 3}
TimeOut: 1
--- !u!1 &1391291191
GameObject:
m_ObjectHideFlags: 0
@ -18400,6 +18401,7 @@ GameObject:
- component: {fileID: 1540630979}
- component: {fileID: 1540630983}
- component: {fileID: 1540630984}
- component: {fileID: 1540630985}
m_Layer: 5
m_Name: ConfigCanvas
m_TagString: Untagged
@ -18525,6 +18527,18 @@ MonoBehaviour:
m_EditorClassIdentifier:
Tab1Object: {fileID: 345594101}
Tab2Object: {fileID: 2132940620}
--- !u!114 &1540630985
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1540630978}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b526671be9b255a40b719b5bee861354, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1542919053
GameObject:
m_ObjectHideFlags: 0
@ -24686,7 +24700,7 @@ MonoBehaviour:
desktopIndex_: 0
captureMode: 1
capturePriority: 0
captureRequestTiming: 0
captureRequestTiming: 1
captureFrameRate: 90
drawCursor: 0
updateTitle: 1
@ -25718,6 +25732,7 @@ MonoBehaviour:
- {fileID: 780355265}
- {fileID: 637424750}
- {fileID: 611590979}
RingLedsWhitePointSubtractor: 130
BodyLed: {fileID: 934521995}
DisplayLed: {fileID: 934521994}
BodyLedIntensity: 0.015

View File

@ -0,0 +1,22 @@
{
"name": "Config",
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:56dd35f9b6f21364494ed8365264cbf6",
"GUID:fe685ec1767f73d42b749ea8045bfe43",
"GUID:fdf862963556fe149b106be8cc0e538b",
"GUID:94a65d39be45e8a4c8edded492e0f093",
"GUID:1491147abca9d7d4bb7105af628b223e",
"GUID:6ef0fb8c83edbc44e80b129fa07fe90b"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -5,10 +5,11 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Linq;
using System;
public static class JsonConfig {
public static bool hasInitialized = false;
private static JObject config;
public static JObject config;
private static void ensureInitialization() {
if (hasInitialized)
@ -20,8 +21,14 @@ public static class JsonConfig {
private static string getFileName() {
return Application.dataPath + "/../config.json";
}
private static void saveFile() {
if (JsonConfigBehavior.instance != null)
JsonConfigBehavior.saveFile();
}
public static IEnumerator saveFileWait() {
yield return new WaitForSeconds(1.5f); //
sort(config);
File.WriteAllText(getFileName(), config.ToString());
}
@ -33,6 +40,21 @@ public static class JsonConfig {
saveFile();
}
}
private static void sort(JObject jObj)
{
var props = jObj.Properties().ToList();
foreach (var prop in props)
{
prop.Remove();
}
foreach (var prop in props.OrderBy(p=>p.Name))
{
jObj.Add(prop);
if(prop.Value is JObject)
sort((JObject)prop.Value);
}
}
public static void DeleteAll() {
ensureInitialization();
@ -81,6 +103,11 @@ public static class JsonConfig {
public static void SetQuaternion(string key, Quaternion quaternion) {
SetFloatArray(key, new float[] { quaternion.x, quaternion.y, quaternion.z, quaternion.w });
}
public static void SetJObject(string key, JObject value) {
ensureInitialization();
config[key] = JObject.FromObject(value);
saveFile();
}
public static bool GetBoolean(string key) {
ensureInitialization();
@ -108,4 +135,8 @@ public static class JsonConfig {
public static Quaternion GetQuaternion(string key) {
return new Quaternion(GetFloatArray(key)[0], GetFloatArray(key)[1], GetFloatArray(key)[2], GetFloatArray(key)[3]);
}
public static JObject GetJObject(string key) {
ensureInitialization();
return config.Value<JObject>(key);
}
}

View File

@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JsonConfigBehavior : MonoBehaviour
{
public static JsonConfigBehavior instance;
void Awake()
{
instance = this;
}
public static void saveFile()
{
instance.StopCoroutine(JsonConfig.saveFileWait());
instance.StartCoroutine(JsonConfig.saveFileWait());
}
}

View File

@ -1,6 +1,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Newtonsoft.Json.Linq;
public class NoneVRSettingManager : MonoBehaviour
{

View File

@ -1,6 +1,7 @@
using UnityEngine.UI;
using UnityEngine;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public class PlayerSettingManager : MonoBehaviour
{
@ -68,76 +69,76 @@ public class PlayerSettingManager : MonoBehaviour
}
private void GetPlayerHeight()
{
if (JsonConfig.HasKey("PlayerHeight"))
PlayerHeightManager.Value = (float)JsonConfig.GetDouble("PlayerHeight");
if (PlayerConfig.HasKey("PlayerHeight"))
PlayerHeightManager.Value = (float)PlayerConfig.GetDouble("PlayerHeight");
SetPlayerHeight();
}
private void GetHandSize()
{
if (JsonConfig.HasKey("HandSize"))
HandSize = (float)JsonConfig.GetDouble("HandSize");
if (PlayerConfig.HasKey("HandSize"))
HandSize = (float)PlayerConfig.GetDouble("HandSize");
SetHandSize(HandSize);
}
private void GetHandPositionX()
{
if (JsonConfig.HasKey("HandPositionX"))
HandPositionX = (float)JsonConfig.GetDouble("HandPositionX");
if (PlayerConfig.HasKey("HandPositionX"))
HandPositionX = (float)PlayerConfig.GetDouble("HandPositionX");
SetHandPositionX(HandPositionX);
}
private void GetHandPositionY()
{
if (JsonConfig.HasKey("HandPositionY"))
HandPositionY = (float)JsonConfig.GetDouble("HandPositionY");
if (PlayerConfig.HasKey("HandPositionY"))
HandPositionY = (float)PlayerConfig.GetDouble("HandPositionY");
SetHandPositionY(HandPositionY);
}
private void GetHandPositionZ()
{
if (JsonConfig.HasKey("HandPositionZ"))
HandPositionZ = (float)JsonConfig.GetDouble("HandPositionZ");
if (PlayerConfig.HasKey("HandPositionZ"))
HandPositionZ = (float)PlayerConfig.GetDouble("HandPositionZ");
SetHandPositionZ(HandPositionZ);
}
void GetHapticDuration()
{
if (JsonConfig.HasKey("HapticDuration"))
HapticManagers[0].duration = (float)JsonConfig.GetDouble("HapticDuration");
if (PlayerConfig.HasKey("HapticDuration"))
HapticManagers[0].duration = (float)PlayerConfig.GetDouble("HapticDuration");
SetHapticDuration(HapticManagers[0].duration);
}
void GetHapticAmplitude()
{
if (JsonConfig.HasKey("HapticAmplitude"))
HapticManagers[0].amplitude = (float)JsonConfig.GetDouble("HapticAmplitude") * 10;
if (PlayerConfig.HasKey("HapticAmplitude"))
HapticManagers[0].amplitude = (float)PlayerConfig.GetDouble("HapticAmplitude") * 10;
SetHapticAmplitude(HapticManagers[0].amplitude);
}
public void SetPlayerHeight()
{
PlayerTransform.position = new Vector3(PlayerTransform.position.x, PlayerHeightManager.Value, PlayerTransform.position.z);
JsonConfig.SetDouble("PlayerHeight", PlayerHeightManager.Value);
PlayerConfig.SetDouble("PlayerHeight", PlayerHeightManager.Value);
}
public void SetHandSize(float value)
{
JsonConfig.SetDouble("HandSize", value);
PlayerConfig.SetDouble("HandSize", value);
value = value / 100;
LHandTransform.localScale = new Vector3(value, value, value);
RHandTransform.localScale = new Vector3(value, value, value);
}
public void SetHandPositionX(float value)
{
JsonConfig.SetDouble("HandPositionX", value);
PlayerConfig.SetDouble("HandPositionX", value);
value = value / 100;
LHandTransform.localPosition = new Vector3(value, LHandTransform.localPosition.y, LHandTransform.localPosition.z);
RHandTransform.localPosition = new Vector3(-value, RHandTransform.localPosition.y, RHandTransform.localPosition.z);
}
public void SetHandPositionY(float value)
{
JsonConfig.SetDouble("HandPositionY", value);
PlayerConfig.SetDouble("HandPositionY", value);
value = value / 100;
LHandTransform.localPosition = new Vector3(LHandTransform.localPosition.x, value, LHandTransform.localPosition.z);
RHandTransform.localPosition = new Vector3(RHandTransform.localPosition.x, value, RHandTransform.localPosition.z);
}
public void SetHandPositionZ(float value)
{
JsonConfig.SetDouble("HandPositionZ", value);
PlayerConfig.SetDouble("HandPositionZ", value);
value = value / 100;
LHandTransform.localPosition = new Vector3(LHandTransform.localPosition.x, LHandTransform.localPosition.y, value);
RHandTransform.localPosition = new Vector3(RHandTransform.localPosition.x, RHandTransform.localPosition.y, value);
@ -148,7 +149,7 @@ public class PlayerSettingManager : MonoBehaviour
{
controller.duration = duration;
}
JsonConfig.SetDouble("HapticDuration", duration);
PlayerConfig.SetDouble("HapticDuration", duration);
}
public void SetHapticAmplitude(float amplitude)
{
@ -157,6 +158,40 @@ public class PlayerSettingManager : MonoBehaviour
{
controller.amplitude = amplitude;
}
JsonConfig.SetDouble("HapticAmplitude", amplitude);
PlayerConfig.SetDouble("HapticAmplitude", amplitude);
}
private static class PlayerConfig
{
static JObject playerConfig;
public static bool hasInitialized = false;
private static void ensureInitialization() {
if (hasInitialized)
return;
GetPlayerConfig();
hasInitialized = true;
}
public static bool HasKey(string key) {
ensureInitialization();
return playerConfig.ContainsKey(key);
}
public static void SetDouble(string key, double number) {
ensureInitialization();
playerConfig[key] = number;
SetPlayerConfig();
}
public static double GetDouble(string key) {
ensureInitialization();
return playerConfig.Value<double>(key);
}
public static void SetPlayerConfig() {
JsonConfig.SetJObject("PlayerConfig", playerConfig);
}
public static void GetPlayerConfig() {
if (JsonConfig.HasKey("PlayerConfig"))
playerConfig = JsonConfig.GetJObject("PlayerConfig");
else
playerConfig = new JObject();
}
}
}

View File

@ -0,0 +1,17 @@
{
"name": "Essentials",
"rootNamespace": "",
"references": [
"GUID:1491147abca9d7d4bb7105af628b223e",
"GUID:94a65d39be45e8a4c8edded492e0f093"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScreenIdleManager : MonoBehaviour
{
public Texture IdleTexture;
public float TimeOut;
private Texture OldTexture;
private float timeCounter;
private Material Material;
void Start()
{
Material = GetComponent<Renderer>().material;
}
void Update()
{
timeCounter += Time.deltaTime;
if (OldTexture != Material.mainTexture || Material.mainTexture != null)
{
timeCounter = 0;
OldTexture = Material.mainTexture;
}
if (timeCounter > TimeOut)
{
Material.mainTexture = IdleTexture;
timeCounter = 0;
}
}
}

View File

@ -0,0 +1,17 @@
{
"name": "IOs",
"rootNamespace": "",
"references": [
"GUID:fe685ec1767f73d42b749ea8045bfe43",
"GUID:84d8d7a835b80ec4180283d6c9ff308e"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -1,5 +1,4 @@

using UnityEngine;
using UnityEngine;
using System.IO.Ports;
using System;
using System.Collections;
@ -14,6 +13,7 @@ public class LightManager : MonoBehaviour
public List<List<byte>> dataListInstantP1 = new List<List<byte>>();
static bool isUpdateCMD = false;
public List<Light> RingLeds = new List<Light>();
public byte RingLedsWhitePointSubtractor = 130;
public Light BodyLed;
public Light DisplayLed;
public float BodyLedIntensity = 0.0f;
@ -126,7 +126,7 @@ public class LightManager : MonoBehaviour
case 49:
//Debug.Log($"CMD49: {string.Join(", ", data)}");
int index = data[1];
mp = Convert.ToByte(127 * ((data[2]+data[3]+data[4]) / 765));
mp = Convert.ToByte(RingLedsWhitePointSubtractor * ((data[2]+data[3]+data[4]) / 765));
ringLeds[index].color = new Color32((byte)(data[2] - mp), (byte)(data[3] - mp), (byte)(data[4] - mp), 255);
if (!SerialManager.startUp)
SerialManager.startUp = true;
@ -136,7 +136,7 @@ public class LightManager : MonoBehaviour
//Debug.Log($"CMD50/51: {string.Join(", ", data)}");
if (data[2] > 8)
data[2] = 8;
mp = Convert.ToByte(127 * ((data[4]+data[5]+data[6]) / 765));
mp = Convert.ToByte(RingLedsWhitePointSubtractor * ((data[4]+data[5]+data[6]) / 765));
nowCorlor = new Color32((byte)(data[4] - mp), (byte)(data[5] - mp), (byte)(data[6] - mp), 255);
if (data[0]==50)
Switch(data[1], data[2], ringLeds, nowCorlor);

View File

@ -0,0 +1,16 @@
{
"name": "Serial",
"rootNamespace": "",
"references": [
"GUID:b93f844d45cfcc44fa2b0eed5c9ec6bb"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -6,7 +6,8 @@
"GUID:335e60c3f2584c947bb2dd55d449ab18",
"GUID:4d14b15ded5e3ac4499a81ec3fc340fc",
"GUID:56dd35f9b6f21364494ed8365264cbf6",
"GUID:ec8e026973d4d094882a84e64338c685"
"GUID:ec8e026973d4d094882a84e64338c685",
"GUID:1eb2719302331e4439b7bdf73d4bac81"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -1,7 +1,8 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
using uWindowCapture;
using Unity.Netcode;
using Newtonsoft.Json.Linq;
public class WindowEncoder : NetworkBehaviour
{
@ -18,19 +19,19 @@ public class WindowEncoder : NetworkBehaviour
height = 1080,
frameRate = 24,
format = uNvEncoder.Format.B8G8R8A8_UNORM,
bitRate = 98304,
maxFrameSize = 4096,
bitRate = 196608,
maxFrameSize = 8192,
};
public int idrFrameIntervalFrame = 24;
int idrFrameCounter_ = 0;
public int ResolutionDivider = 2;
public Texture2D sTexture;
Texture2D sTexture;
void Start()
{
if (!IsOwner) return;
GetSetting();
StartCoroutine(EncodeLoop());
}
@ -40,6 +41,25 @@ public class WindowEncoder : NetworkBehaviour
StopAllCoroutines();
encoder.Destroy();
}
void GetSetting()
{
if (JsonConfig.HasKey("EncoderSetting"))
{
var _setting = JsonConfig.GetJObject("EncoderSetting");
ResolutionDivider = _setting.Value<int>("ResolutionDivider");
_setting.Remove("ResolutionDivider");
setting = _setting.ToObject<uNvEncoder.EncoderDesc>();
}
SetSetting(setting, ResolutionDivider);
}
void SetSetting(uNvEncoder.EncoderDesc _setting, int resolutionDivider)
{
var JObj= JObject.FromObject(_setting);
JObj.Remove("width"); JObj.Remove("height");
JObj["ResolutionDivider"] = resolutionDivider;
JsonConfig.SetJObject("EncoderSetting", JObj);
}
RenderTexture rt;
void Resize()
@ -84,16 +104,4 @@ public class WindowEncoder : NetworkBehaviour
if (encoder == null) return;
encoder.Reconfigure(setting);
}
public ComputeShader ResizeShader;
Texture2D Resize(ComputeShader shader, Texture2D inputTexture, int divideSize)
{
Texture2D t = new Texture2D(inputTexture.width/divideSize, inputTexture.height/divideSize, TextureFormat.BGRA32, false);
int k = shader.FindKernel("Resize");
shader.SetInt("divideSize", divideSize);
shader.SetTexture(k, "inputTexture", inputTexture);
shader.SetTexture(k, "outputTexture", t);
shader.Dispatch(k, inputTexture.width / 8, inputTexture.height / 8, 1);
return t;
}
}

View File

@ -1,11 +0,0 @@
#pragma kernel Resize
int divideSize;
Texture2D inputTexture;
RWTexture2D <float4> outputTexture;
[numthreads(8, 8, 1)]
void Resize(uint3 id : SV_DispatchThreadID)
{
outputTexture[id.xy / divideSize] = inputTexture[id.xy];
}

View File

@ -146,7 +146,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 274c02963f889a64e90bc2e596e21d13, type: 3}
m_Name: HTCViveControllerProfile Standalone
m_EditorClassIdentifier:
m_enabled: 0
m_enabled: 1
nameUi: HTC Vive Controller Profile
version: 0.0.1
featureIdInternal: com.unity.openxr.feature.input.htcvive
@ -241,7 +241,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0d6ccd3d0ef0f1d458e69421dccbdae1, type: 3}
m_Name: ValveIndexControllerProfile Standalone
m_EditorClassIdentifier:
m_enabled: 0
m_enabled: 1
nameUi: Valve Index Controller Profile
version: 0.0.1
featureIdInternal: com.unity.openxr.feature.input.valveindex

View File

@ -1,19 +1,17 @@
{
"dependencies": {
"com.community.netcode.transport.enet": "https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.enet",
"com.community.netcode.transport.websocket": "https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.websocket",
"com.hecomi.unvencoder": "https://github.com/hecomi/uNvEncoder.git#upm",
"com.hecomi.unvpipe": "https://github.com/hecomi/uNvPipe.git#upm",
"com.hecomi.upacketdivision": "https://github.com/hecomi/uPacketDivision.git#upm",
"com.hecomi.uwindowcapture": "https://github.com/hecomi/uWindowCapture.git#upm",
"com.unity.ide.visualstudio": "2.0.14",
"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.render-pipelines.universal": "12.1.6",
"com.unity.render-pipelines.universal": "12.1.7",
"com.unity.test-framework": "2.0.1-pre.18",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.6.4",
"com.unity.ugui": "1.0.0",
"com.unity.xr.interaction.toolkit": "2.1.1",
"com.unity.xr.management": "4.2.1",

View File

@ -7,13 +7,6 @@
"dependencies": {},
"hash": "095d1c78b77f405b44c9ff4ae20c3a01f6d3cddc"
},
"com.community.netcode.transport.websocket": {
"version": "https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.websocket",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "095d1c78b77f405b44c9ff4ae20c3a01f6d3cddc"
},
"com.hecomi.unvencoder": {
"version": "https://github.com/hecomi/uNvEncoder.git#upm",
"depth": 0,
@ -43,8 +36,8 @@
"hash": "0412fe09e11d3720197707a935f8114cc2454639"
},
"com.unity.burst": {
"version": "1.6.6",
"depth": 2,
"version": "1.7.3",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1"
@ -76,7 +69,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.14",
"version": "2.0.16",
"depth": 0,
"source": "registry",
"dependencies": {
@ -92,7 +85,7 @@
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.3.0",
"version": "1.4.1",
"depth": 1,
"source": "registry",
"dependencies": {
@ -101,7 +94,7 @@
"url": "https://packages.unity.com"
},
"com.unity.learn.iet-framework": {
"version": "2.2.1",
"version": "2.2.2",
"depth": 1,
"source": "registry",
"dependencies": {
@ -132,7 +125,7 @@
"hash": "55bc606b0ae04e2368bdaeda903440570bd44900"
},
"com.unity.multiplayer.tools": {
"version": "1.0.0-pre.7",
"version": "1.0.0",
"depth": 1,
"source": "registry",
"dependencies": {
@ -176,7 +169,7 @@
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "12.1.6",
"version": "12.1.7",
"depth": 1,
"source": "builtin",
"dependencies": {
@ -186,14 +179,14 @@
}
},
"com.unity.render-pipelines.universal": {
"version": "12.1.6",
"version": "12.1.7",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.burst": "1.5.0",
"com.unity.render-pipelines.core": "12.1.6",
"com.unity.shadergraph": "12.1.6"
"com.unity.burst": "1.7.3",
"com.unity.render-pipelines.core": "12.1.7",
"com.unity.shadergraph": "12.1.7"
}
},
"com.unity.searcher": {
@ -204,18 +197,19 @@
"url": "https://packages.unity.com"
},
"com.unity.services.authentication": {
"version": "2.0.0",
"depth": 2,
"version": "2.1.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.services.core": "1.3.1",
"com.unity.modules.unitywebrequest": "1.0.0"
"com.unity.services.core": "1.4.2",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.ugui": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.4.0",
"version": "1.4.2",
"depth": 2,
"source": "registry",
"dependencies": {
@ -226,48 +220,48 @@
"url": "https://packages.unity.com"
},
"com.unity.services.lobby": {
"version": "1.0.0-pre.6",
"version": "1.0.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.services.core": "1.1.0-pre.10",
"com.unity.services.core": "1.4.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.services.authentication": "1.0.0-pre.6"
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.services.authentication": "2.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.services.qos": {
"version": "1.0.0",
"version": "1.0.1",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.services.core": "1.3.2",
"com.unity.services.core": "1.4.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.1",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.services.authentication": "2.0.0",
"com.unity.collections": "1.2.3"
},
"url": "https://packages.unity.com"
},
"com.unity.services.relay": {
"version": "1.0.2",
"version": "1.0.3",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.services.core": "1.4.0",
"com.unity.services.authentication": "2.0.0",
"com.unity.services.qos": "1.0.0",
"com.unity.services.qos": "1.0.1",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.1",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.transport": "1.0.0"
},
"url": "https://packages.unity.com"
@ -280,11 +274,11 @@
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "12.1.6",
"version": "12.1.7",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "12.1.6",
"com.unity.render-pipelines.core": "12.1.7",
"com.unity.searcher": "4.9.1"
}
},
@ -317,18 +311,6 @@
},
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.6.4",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.transport": {
"version": "1.1.0",
"depth": 1,

View File

@ -175,6 +175,15 @@ PlayerSettings:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {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
@ -190,6 +199,7 @@ PlayerSettings:
m_ColorGamuts: 00000000
targetPixelDensity: 30
resolutionScalingMode: 0
resetResolutionOnWindowResize: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
@ -792,6 +802,7 @@ PlayerSettings:
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
@ -835,7 +846,7 @@ PlayerSettings:
assemblyVersionValidation: 1
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform:
Standalone: 3
Standalone: 6
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: com.unity.template-starter-kit
@ -906,7 +917,7 @@ PlayerSettings:
luminVersion:
m_VersionCode: 1
m_VersionName:
apiCompatibilityLevel: 6
apiCompatibilityLevel: 8
activeInputHandler: 2
cloudProjectId:
framebufferDepthMemorylessMode: 0

View File

@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.2f1
m_EditorVersionWithRevision: 2021.3.2f1 (d6360bedb9a0)
m_EditorVersion: 2021.3.8f1
m_EditorVersionWithRevision: 2021.3.8f1 (b30333d56e81)