fr.jeanf.universal.player 0.8.23 → 0.8.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -359,10 +359,12 @@ MonoBehaviour:
|
|
|
359
359
|
lightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
|
360
360
|
darkSkinColor: {r: 0.23584908, g: 0.1764706, b: 0.15294118, a: 1}
|
|
361
361
|
gloveValue: 0
|
|
362
|
-
_hands:
|
|
362
|
+
_hands:
|
|
363
|
+
- {fileID: 0}
|
|
364
|
+
- {fileID: 0}
|
|
363
365
|
isGlove: 0
|
|
364
366
|
isHandVisible: 0
|
|
365
|
-
lastHandVisibility:
|
|
367
|
+
lastHandVisibility: 1
|
|
366
368
|
canUpdate: 0
|
|
367
369
|
shiftTypeHandAction: {fileID: -6974777946573060807, guid: 110d9016d6486d84697b9d7a66a57d45,
|
|
368
370
|
type: 3}
|
|
@@ -1502,8 +1504,8 @@ Transform:
|
|
|
1502
1504
|
m_PrefabAsset: {fileID: 0}
|
|
1503
1505
|
m_GameObject: {fileID: 2278783626678670785}
|
|
1504
1506
|
serializedVersion: 2
|
|
1505
|
-
m_LocalRotation: {x:
|
|
1506
|
-
m_LocalPosition: {x: 0, y:
|
|
1507
|
+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
1508
|
+
m_LocalPosition: {x: -0.296, y: 0, z: 0}
|
|
1507
1509
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
1508
1510
|
m_ConstrainProportionsScale: 0
|
|
1509
1511
|
m_Children:
|
|
@@ -2990,6 +2992,7 @@ MonoBehaviour:
|
|
|
2990
2992
|
m_RepeatRate: 0.1
|
|
2991
2993
|
m_TrackedDeviceDragThresholdMultiplier: 2
|
|
2992
2994
|
m_TrackedScrollDeltaMultiplier: 5
|
|
2995
|
+
m_BypassUIToolkitEvents: 0
|
|
2993
2996
|
m_ActiveInputMode: 1
|
|
2994
2997
|
m_EnableXRInput: 1
|
|
2995
2998
|
m_EnableMouseInput: 1
|
|
@@ -3927,7 +3930,7 @@ MonoBehaviour:
|
|
|
3927
3930
|
m_IsGlobal: 0
|
|
3928
3931
|
priority: 0
|
|
3929
3932
|
blendDistance: 0
|
|
3930
|
-
weight:
|
|
3933
|
+
weight: 0.458
|
|
3931
3934
|
sharedProfile: {fileID: 11400000, guid: ab06ed5ee4fe73548b3c4829b155a02d, type: 2}
|
|
3932
3935
|
--- !u!114 &8755935149309269784
|
|
3933
3936
|
MonoBehaviour:
|
|
@@ -3952,8 +3955,7 @@ MonoBehaviour:
|
|
|
3952
3955
|
m_Interactions:
|
|
3953
3956
|
m_SingletonActionBindings: []
|
|
3954
3957
|
m_Flags: 0
|
|
3955
|
-
|
|
3956
|
-
URPVolumeProfile: {fileID: 11400000, guid: ab06ed5ee4fe73548b3c4829b155a02d, type: 2}
|
|
3958
|
+
volumeProfile: {fileID: 0}
|
|
3957
3959
|
postProcessVolume: {fileID: 1989632603716548249}
|
|
3958
3960
|
fadeOutChannelSO: {fileID: 11400000, guid: 81e451f2c982d9a4bbba1960913d44b0, type: 2}
|
|
3959
3961
|
--- !u!135 &3359612486687220250
|
|
@@ -5661,8 +5663,8 @@ Transform:
|
|
|
5661
5663
|
m_PrefabAsset: {fileID: 0}
|
|
5662
5664
|
m_GameObject: {fileID: 8387425044706141412}
|
|
5663
5665
|
serializedVersion: 2
|
|
5664
|
-
m_LocalRotation: {x:
|
|
5665
|
-
m_LocalPosition: {x: 0, y:
|
|
5666
|
+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
5667
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
5666
5668
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
5667
5669
|
m_ConstrainProportionsScale: 0
|
|
5668
5670
|
m_Children:
|
|
@@ -6890,6 +6892,11 @@ PrefabInstance:
|
|
|
6890
6892
|
propertyPath: m_Parameters.numCapVertices
|
|
6891
6893
|
value: 4
|
|
6892
6894
|
objectReference: {fileID: 0}
|
|
6895
|
+
- target: {fileID: 2761784063978902504, guid: c1800acf6366418a9b5f610249000331,
|
|
6896
|
+
type: 3}
|
|
6897
|
+
propertyPath: m_Parameters.widthMultiplier
|
|
6898
|
+
value: 0.01
|
|
6899
|
+
objectReference: {fileID: 0}
|
|
6893
6900
|
- target: {fileID: 2761784063978902504, guid: c1800acf6366418a9b5f610249000331,
|
|
6894
6901
|
type: 3}
|
|
6895
6902
|
propertyPath: m_Parameters.numCornerVertices
|
|
@@ -7357,7 +7364,7 @@ PrefabInstance:
|
|
|
7357
7364
|
- target: {fileID: 1925769544920504264, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7358
7365
|
type: 3}
|
|
7359
7366
|
propertyPath: m_Enabled
|
|
7360
|
-
value:
|
|
7367
|
+
value: 1
|
|
7361
7368
|
objectReference: {fileID: 0}
|
|
7362
7369
|
- target: {fileID: 2417358720014700305, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7363
7370
|
type: 3}
|
|
@@ -7369,10 +7376,70 @@ PrefabInstance:
|
|
|
7369
7376
|
propertyPath: m_Name
|
|
7370
7377
|
value: Poke Interactor
|
|
7371
7378
|
objectReference: {fileID: 0}
|
|
7379
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7380
|
+
type: 3}
|
|
7381
|
+
propertyPath: m_LocalScale.x
|
|
7382
|
+
value: 0.015929166
|
|
7383
|
+
objectReference: {fileID: 0}
|
|
7384
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7385
|
+
type: 3}
|
|
7386
|
+
propertyPath: m_LocalScale.y
|
|
7387
|
+
value: 0.015929166
|
|
7388
|
+
objectReference: {fileID: 0}
|
|
7389
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7390
|
+
type: 3}
|
|
7391
|
+
propertyPath: m_LocalScale.z
|
|
7392
|
+
value: 0.015929166
|
|
7393
|
+
objectReference: {fileID: 0}
|
|
7394
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7395
|
+
type: 3}
|
|
7396
|
+
propertyPath: m_LocalPosition.x
|
|
7397
|
+
value: 0
|
|
7398
|
+
objectReference: {fileID: 0}
|
|
7399
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7400
|
+
type: 3}
|
|
7401
|
+
propertyPath: m_LocalPosition.y
|
|
7402
|
+
value: -0.0135
|
|
7403
|
+
objectReference: {fileID: 0}
|
|
7404
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7405
|
+
type: 3}
|
|
7406
|
+
propertyPath: m_LocalPosition.z
|
|
7407
|
+
value: 0.0142
|
|
7408
|
+
objectReference: {fileID: 0}
|
|
7409
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7410
|
+
type: 3}
|
|
7411
|
+
propertyPath: m_LocalRotation.w
|
|
7412
|
+
value: 0.96625876
|
|
7413
|
+
objectReference: {fileID: 0}
|
|
7414
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7415
|
+
type: 3}
|
|
7416
|
+
propertyPath: m_LocalRotation.x
|
|
7417
|
+
value: 0.25757337
|
|
7418
|
+
objectReference: {fileID: 0}
|
|
7419
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7420
|
+
type: 3}
|
|
7421
|
+
propertyPath: m_LocalRotation.y
|
|
7422
|
+
value: 0.000000023883674
|
|
7423
|
+
objectReference: {fileID: 0}
|
|
7424
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7425
|
+
type: 3}
|
|
7426
|
+
propertyPath: m_LocalRotation.z
|
|
7427
|
+
value: 0.0000000028373721
|
|
7428
|
+
objectReference: {fileID: 0}
|
|
7429
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7430
|
+
type: 3}
|
|
7431
|
+
propertyPath: m_LocalEulerAnglesHint.x
|
|
7432
|
+
value: 29.852
|
|
7433
|
+
objectReference: {fileID: 0}
|
|
7372
7434
|
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7373
7435
|
type: 3}
|
|
7374
7436
|
propertyPath: m_LocalEulerAnglesHint.y
|
|
7375
|
-
value:
|
|
7437
|
+
value: 0
|
|
7438
|
+
objectReference: {fileID: 0}
|
|
7439
|
+
- target: {fileID: 8692027818177823645, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
7440
|
+
type: 3}
|
|
7441
|
+
propertyPath: m_Enabled
|
|
7442
|
+
value: 0
|
|
7376
7443
|
objectReference: {fileID: 0}
|
|
7377
7444
|
m_RemovedComponents: []
|
|
7378
7445
|
m_RemovedGameObjects: []
|
|
@@ -8524,6 +8591,11 @@ PrefabInstance:
|
|
|
8524
8591
|
propertyPath: m_Parameters.numCapVertices
|
|
8525
8592
|
value: 4
|
|
8526
8593
|
objectReference: {fileID: 0}
|
|
8594
|
+
- target: {fileID: 2761784063978902504, guid: c1800acf6366418a9b5f610249000331,
|
|
8595
|
+
type: 3}
|
|
8596
|
+
propertyPath: m_Parameters.widthMultiplier
|
|
8597
|
+
value: 0.01
|
|
8598
|
+
objectReference: {fileID: 0}
|
|
8527
8599
|
- target: {fileID: 2761784063978902504, guid: c1800acf6366418a9b5f610249000331,
|
|
8528
8600
|
type: 3}
|
|
8529
8601
|
propertyPath: m_Parameters.numCornerVertices
|
|
@@ -8710,7 +8782,7 @@ PrefabInstance:
|
|
|
8710
8782
|
- target: {fileID: 1925769544920504264, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8711
8783
|
type: 3}
|
|
8712
8784
|
propertyPath: m_Enabled
|
|
8713
|
-
value:
|
|
8785
|
+
value: 1
|
|
8714
8786
|
objectReference: {fileID: 0}
|
|
8715
8787
|
- target: {fileID: 2417358720014700305, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8716
8788
|
type: 3}
|
|
@@ -8728,10 +8800,70 @@ PrefabInstance:
|
|
|
8728
8800
|
value:
|
|
8729
8801
|
objectReference: {fileID: 8877177980677234388, guid: de9f91a37e546c64197961b0badf093c,
|
|
8730
8802
|
type: 3}
|
|
8803
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8804
|
+
type: 3}
|
|
8805
|
+
propertyPath: m_LocalScale.x
|
|
8806
|
+
value: 0.016718
|
|
8807
|
+
objectReference: {fileID: 0}
|
|
8808
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8809
|
+
type: 3}
|
|
8810
|
+
propertyPath: m_LocalScale.y
|
|
8811
|
+
value: 0.016718
|
|
8812
|
+
objectReference: {fileID: 0}
|
|
8813
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8814
|
+
type: 3}
|
|
8815
|
+
propertyPath: m_LocalScale.z
|
|
8816
|
+
value: 0.016718
|
|
8817
|
+
objectReference: {fileID: 0}
|
|
8818
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8819
|
+
type: 3}
|
|
8820
|
+
propertyPath: m_LocalPosition.x
|
|
8821
|
+
value: 0.0007
|
|
8822
|
+
objectReference: {fileID: 0}
|
|
8823
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8824
|
+
type: 3}
|
|
8825
|
+
propertyPath: m_LocalPosition.y
|
|
8826
|
+
value: -0.0116
|
|
8827
|
+
objectReference: {fileID: 0}
|
|
8828
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8829
|
+
type: 3}
|
|
8830
|
+
propertyPath: m_LocalPosition.z
|
|
8831
|
+
value: 0.0192
|
|
8832
|
+
objectReference: {fileID: 0}
|
|
8833
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8834
|
+
type: 3}
|
|
8835
|
+
propertyPath: m_LocalRotation.w
|
|
8836
|
+
value: 0.9884403
|
|
8837
|
+
objectReference: {fileID: 0}
|
|
8838
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8839
|
+
type: 3}
|
|
8840
|
+
propertyPath: m_LocalRotation.x
|
|
8841
|
+
value: 0.14618813
|
|
8842
|
+
objectReference: {fileID: 0}
|
|
8843
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8844
|
+
type: 3}
|
|
8845
|
+
propertyPath: m_LocalRotation.y
|
|
8846
|
+
value: 0.02707173
|
|
8847
|
+
objectReference: {fileID: 0}
|
|
8848
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8849
|
+
type: 3}
|
|
8850
|
+
propertyPath: m_LocalRotation.z
|
|
8851
|
+
value: 0.02969769
|
|
8852
|
+
objectReference: {fileID: 0}
|
|
8853
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8854
|
+
type: 3}
|
|
8855
|
+
propertyPath: m_LocalEulerAnglesHint.x
|
|
8856
|
+
value: 16.702
|
|
8857
|
+
objectReference: {fileID: 0}
|
|
8731
8858
|
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8732
8859
|
type: 3}
|
|
8733
8860
|
propertyPath: m_LocalEulerAnglesHint.y
|
|
8734
|
-
value:
|
|
8861
|
+
value: 3.723
|
|
8862
|
+
objectReference: {fileID: 0}
|
|
8863
|
+
- target: {fileID: 8259524632637961923, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8864
|
+
type: 3}
|
|
8865
|
+
propertyPath: m_LocalEulerAnglesHint.z
|
|
8866
|
+
value: 3.989
|
|
8735
8867
|
objectReference: {fileID: 0}
|
|
8736
8868
|
- target: {fileID: 8692027818177823645, guid: 27024f5809f4a4347b9cd7f26a1bdf93,
|
|
8737
8869
|
type: 3}
|
|
@@ -10097,8 +10229,7 @@ MonoBehaviour:
|
|
|
10097
10229
|
m_Interactions:
|
|
10098
10230
|
m_SingletonActionBindings: []
|
|
10099
10231
|
m_Flags: 0
|
|
10100
|
-
m_Reference: {fileID:
|
|
10101
|
-
type: 3}
|
|
10232
|
+
m_Reference: {fileID: 0}
|
|
10102
10233
|
m_IsTrackedAction:
|
|
10103
10234
|
m_UseReference: 0
|
|
10104
10235
|
m_Action:
|
|
@@ -10122,8 +10253,7 @@ MonoBehaviour:
|
|
|
10122
10253
|
m_Interactions:
|
|
10123
10254
|
m_SingletonActionBindings: []
|
|
10124
10255
|
m_Flags: 0
|
|
10125
|
-
m_Reference: {fileID:
|
|
10126
|
-
type: 3}
|
|
10256
|
+
m_Reference: {fileID: 0}
|
|
10127
10257
|
m_SelectAction:
|
|
10128
10258
|
m_UseReference: 1
|
|
10129
10259
|
m_Action:
|
|
@@ -10161,8 +10291,7 @@ MonoBehaviour:
|
|
|
10161
10291
|
m_Interactions:
|
|
10162
10292
|
m_SingletonActionBindings: []
|
|
10163
10293
|
m_Flags: 0
|
|
10164
|
-
m_Reference: {fileID:
|
|
10165
|
-
type: 3}
|
|
10294
|
+
m_Reference: {fileID: 0}
|
|
10166
10295
|
m_ActivateActionValue:
|
|
10167
10296
|
m_UseReference: 1
|
|
10168
10297
|
m_Action:
|
|
@@ -10187,8 +10316,7 @@ MonoBehaviour:
|
|
|
10187
10316
|
m_Interactions:
|
|
10188
10317
|
m_SingletonActionBindings: []
|
|
10189
10318
|
m_Flags: 0
|
|
10190
|
-
m_Reference: {fileID:
|
|
10191
|
-
type: 3}
|
|
10319
|
+
m_Reference: {fileID: 0}
|
|
10192
10320
|
m_UIPressActionValue:
|
|
10193
10321
|
m_UseReference: 1
|
|
10194
10322
|
m_Action:
|
|
@@ -10225,8 +10353,7 @@ MonoBehaviour:
|
|
|
10225
10353
|
m_Interactions:
|
|
10226
10354
|
m_SingletonActionBindings: []
|
|
10227
10355
|
m_Flags: 0
|
|
10228
|
-
m_Reference: {fileID:
|
|
10229
|
-
type: 3}
|
|
10356
|
+
m_Reference: {fileID: 0}
|
|
10230
10357
|
m_RotateAnchorAction:
|
|
10231
10358
|
m_UseReference: 1
|
|
10232
10359
|
m_Action:
|
|
@@ -10264,8 +10391,7 @@ MonoBehaviour:
|
|
|
10264
10391
|
m_Interactions:
|
|
10265
10392
|
m_SingletonActionBindings: []
|
|
10266
10393
|
m_Flags: 0
|
|
10267
|
-
m_Reference: {fileID:
|
|
10268
|
-
type: 3}
|
|
10394
|
+
m_Reference: {fileID: 0}
|
|
10269
10395
|
m_ScaleToggleAction:
|
|
10270
10396
|
m_UseReference: 0
|
|
10271
10397
|
m_Action:
|
|
@@ -5,6 +5,7 @@ using UnityEngine.Serialization;
|
|
|
5
5
|
using UnityEngine.Rendering;
|
|
6
6
|
using LitMotion;
|
|
7
7
|
using System;
|
|
8
|
+
using System.Collections;
|
|
8
9
|
using System.Linq;
|
|
9
10
|
using Volume = UnityEngine.Rendering.Volume;
|
|
10
11
|
|
|
@@ -12,6 +13,12 @@ namespace jeanf.universalplayer
|
|
|
12
13
|
{
|
|
13
14
|
public class FadeMask : MonoBehaviour, IDebugBehaviour
|
|
14
15
|
{
|
|
16
|
+
public enum FadeType
|
|
17
|
+
{
|
|
18
|
+
Loading, // Black fade for scene loading
|
|
19
|
+
HeadInWall // Saturation fade for collision detection
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
public bool isDebug
|
|
16
23
|
{
|
|
17
24
|
get => _isDebug;
|
|
@@ -44,13 +51,13 @@ namespace jeanf.universalplayer
|
|
|
44
51
|
[SerializeField] private Volume postProcessVolume;
|
|
45
52
|
private static Volume staticPostProcessVolume;
|
|
46
53
|
|
|
47
|
-
// Use objects to handle both URP and HDRP ColorAdjustments via reflection
|
|
48
54
|
private static object hdrpColorAdjustments;
|
|
49
55
|
private static object urpColorAdjustments;
|
|
50
56
|
|
|
51
57
|
private static MotionHandle _fadeHandle;
|
|
52
58
|
private static bool _isCurrentlyFading = false;
|
|
53
59
|
private static bool _targetState = false;
|
|
60
|
+
private static FadeType _currentFadeType = FadeType.Loading;
|
|
54
61
|
|
|
55
62
|
[Header("Listening On")] [SerializeField]
|
|
56
63
|
private BoolFloatEventChannelSO fadeOutChannelSO;
|
|
@@ -59,7 +66,6 @@ namespace jeanf.universalplayer
|
|
|
59
66
|
|
|
60
67
|
public static TogglePpeDelegate TogglePPE;
|
|
61
68
|
|
|
62
|
-
// Pipeline detection
|
|
63
69
|
private enum RenderPipeline
|
|
64
70
|
{
|
|
65
71
|
BuiltIn,
|
|
@@ -74,7 +80,7 @@ namespace jeanf.universalplayer
|
|
|
74
80
|
{
|
|
75
81
|
DetectRenderPipeline();
|
|
76
82
|
SetupVolumeProfile();
|
|
77
|
-
|
|
83
|
+
SetVolumeTo_FadeToBlack();
|
|
78
84
|
FadeValue(false, .5f);
|
|
79
85
|
}
|
|
80
86
|
|
|
@@ -112,7 +118,6 @@ namespace jeanf.universalplayer
|
|
|
112
118
|
return;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
|
-
// Use the assigned volume profile if available
|
|
116
121
|
if (volumeProfile != null)
|
|
117
122
|
{
|
|
118
123
|
postProcessVolume.profile = volumeProfile;
|
|
@@ -123,23 +128,18 @@ namespace jeanf.universalplayer
|
|
|
123
128
|
return;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
|
-
// Handle built-in pipeline
|
|
127
131
|
if (_currentPipeline == RenderPipeline.BuiltIn)
|
|
128
132
|
{
|
|
129
133
|
if (_isDebugSTATIC) Debug.LogWarning("FadeMask: Built-in pipeline detected. Volume system may not be available.");
|
|
130
134
|
return;
|
|
131
135
|
}
|
|
132
136
|
|
|
133
|
-
// Set blend distance (same for all pipelines that support volumes)
|
|
134
137
|
postProcessVolume.blendDistance = 10.0f;
|
|
135
138
|
|
|
136
139
|
staticPostProcessVolume = postProcessVolume;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (!
|
|
140
|
-
{
|
|
141
|
-
if (_isDebugSTATIC) Debug.LogError("FadeMask: ColorAdjustments component not found in volume profile!");
|
|
142
|
-
}
|
|
140
|
+
|
|
141
|
+
if (TryGetColorAdjustments()) return;
|
|
142
|
+
if (_isDebugSTATIC) Debug.LogError("FadeMask: ColorAdjustments component not found in volume profile!");
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
private bool TryGetColorAdjustments()
|
|
@@ -153,7 +153,11 @@ namespace jeanf.universalplayer
|
|
|
153
153
|
|
|
154
154
|
case RenderPipeline.URP:
|
|
155
155
|
return TryGetURPColorAdjustments();
|
|
156
|
-
|
|
156
|
+
|
|
157
|
+
case RenderPipeline.BuiltIn:
|
|
158
|
+
break;
|
|
159
|
+
case RenderPipeline.Unknown:
|
|
160
|
+
break;
|
|
157
161
|
default:
|
|
158
162
|
if (_isDebugSTATIC) Debug.LogError($"FadeMask: Unsupported pipeline: {_currentPipeline}");
|
|
159
163
|
break;
|
|
@@ -172,10 +176,8 @@ namespace jeanf.universalplayer
|
|
|
172
176
|
{
|
|
173
177
|
try
|
|
174
178
|
{
|
|
175
|
-
// Find HDRP ColorAdjustments type
|
|
176
179
|
System.Type hdrpColorAdjustmentsType = System.Type.GetType("UnityEngine.Rendering.HighDefinition.ColorAdjustments, Unity.RenderPipelines.HighDefinition.Runtime");
|
|
177
180
|
|
|
178
|
-
// Fallback: search through loaded assemblies
|
|
179
181
|
if (hdrpColorAdjustmentsType == null)
|
|
180
182
|
{
|
|
181
183
|
foreach (var assembly in System.AppDomain.CurrentDomain.GetAssemblies())
|
|
@@ -194,7 +196,6 @@ namespace jeanf.universalplayer
|
|
|
194
196
|
return false;
|
|
195
197
|
}
|
|
196
198
|
|
|
197
|
-
// Use reflection to call TryGet<T> method
|
|
198
199
|
var profileType = staticPostProcessVolume.profile.GetType();
|
|
199
200
|
var tryGetMethods = profileType.GetMethods().Where(m => m.Name == "TryGet" && m.IsGenericMethodDefinition).ToArray();
|
|
200
201
|
|
|
@@ -231,10 +232,8 @@ namespace jeanf.universalplayer
|
|
|
231
232
|
{
|
|
232
233
|
try
|
|
233
234
|
{
|
|
234
|
-
// Find URP ColorAdjustments type
|
|
235
235
|
System.Type urpColorAdjustmentsType = System.Type.GetType("UnityEngine.Rendering.Universal.ColorAdjustments, Unity.RenderPipelines.Universal.Runtime");
|
|
236
236
|
|
|
237
|
-
// Fallback: search through loaded assemblies
|
|
238
237
|
if (urpColorAdjustmentsType == null)
|
|
239
238
|
{
|
|
240
239
|
foreach (var assembly in System.AppDomain.CurrentDomain.GetAssemblies())
|
|
@@ -253,7 +252,6 @@ namespace jeanf.universalplayer
|
|
|
253
252
|
return false;
|
|
254
253
|
}
|
|
255
254
|
|
|
256
|
-
// Use reflection to call TryGet<T> method
|
|
257
255
|
var profileType = staticPostProcessVolume.profile.GetType();
|
|
258
256
|
var tryGetMethods = profileType.GetMethods().Where(m => m.Name == "TryGet" && m.IsGenericMethodDefinition).ToArray();
|
|
259
257
|
|
|
@@ -310,9 +308,9 @@ namespace jeanf.universalplayer
|
|
|
310
308
|
TogglePPE -= ChangePostProcessing;
|
|
311
309
|
}
|
|
312
310
|
|
|
313
|
-
public static void
|
|
311
|
+
public static void SetVolumeTo_FadeToBlack()
|
|
314
312
|
{
|
|
315
|
-
if (_isDebugSTATIC) Debug.Log($"FadeMask: Setting initial setup for {_currentPipeline}");
|
|
313
|
+
if (_isDebugSTATIC) Debug.Log($"FadeMask: Setting initial setup (black) for {_currentPipeline}");
|
|
316
314
|
|
|
317
315
|
switch (_currentPipeline)
|
|
318
316
|
{
|
|
@@ -333,16 +331,20 @@ namespace jeanf.universalplayer
|
|
|
333
331
|
}
|
|
334
332
|
else if (_isDebugSTATIC) Debug.LogWarning("FadeMask: URP ColorAdjustments is null.");
|
|
335
333
|
break;
|
|
336
|
-
|
|
334
|
+
|
|
335
|
+
case RenderPipeline.BuiltIn:
|
|
336
|
+
break;
|
|
337
|
+
case RenderPipeline.Unknown:
|
|
338
|
+
break;
|
|
337
339
|
default:
|
|
338
340
|
if (_isDebugSTATIC) Debug.LogWarning($"FadeMask: Cannot set initial setup for pipeline: {_currentPipeline}");
|
|
339
341
|
break;
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
344
|
|
|
343
|
-
public static void
|
|
345
|
+
public static void SetVolumeTo_FadeSaturation()
|
|
344
346
|
{
|
|
345
|
-
if (_isDebugSTATIC) Debug.Log($"FadeMask: Setting head in wall setup for {_currentPipeline}");
|
|
347
|
+
if (_isDebugSTATIC) Debug.Log($"FadeMask: Setting head in wall setup (gray) for {_currentPipeline}");
|
|
346
348
|
|
|
347
349
|
switch (_currentPipeline)
|
|
348
350
|
{
|
|
@@ -363,7 +365,11 @@ namespace jeanf.universalplayer
|
|
|
363
365
|
}
|
|
364
366
|
else if (_isDebugSTATIC) Debug.LogWarning("FadeMask: URP ColorAdjustments is null.");
|
|
365
367
|
break;
|
|
366
|
-
|
|
368
|
+
|
|
369
|
+
case RenderPipeline.BuiltIn:
|
|
370
|
+
break;
|
|
371
|
+
case RenderPipeline.Unknown:
|
|
372
|
+
break;
|
|
367
373
|
default:
|
|
368
374
|
if (_isDebugSTATIC) Debug.LogWarning($"FadeMask: Cannot set head in wall setup for pipeline: {_currentPipeline}");
|
|
369
375
|
break;
|
|
@@ -379,12 +385,9 @@ namespace jeanf.universalplayer
|
|
|
379
385
|
var colorAdjustmentsType = colorAdjustments.GetType();
|
|
380
386
|
var parametersProperty = colorAdjustmentsType.GetProperty("parameters");
|
|
381
387
|
if (parametersProperty == null) return;
|
|
382
|
-
|
|
383
388
|
var parameters = parametersProperty.GetValue(colorAdjustments);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
var parametersEnumerable = parameters as System.Collections.IEnumerable;
|
|
387
|
-
if (parametersEnumerable == null) return;
|
|
389
|
+
|
|
390
|
+
if (parameters is not IEnumerable parametersEnumerable) return;
|
|
388
391
|
|
|
389
392
|
var parametersList = new System.Collections.Generic.List<object>();
|
|
390
393
|
foreach (var param in parametersEnumerable)
|
|
@@ -394,57 +397,47 @@ namespace jeanf.universalplayer
|
|
|
394
397
|
|
|
395
398
|
object targetParameter = null;
|
|
396
399
|
|
|
397
|
-
|
|
400
|
+
switch (propertyName)
|
|
398
401
|
{
|
|
399
|
-
|
|
400
|
-
foreach (var param in parametersList)
|
|
402
|
+
case "colorFilter":
|
|
401
403
|
{
|
|
402
|
-
|
|
404
|
+
foreach (var param in parametersList)
|
|
403
405
|
{
|
|
406
|
+
if (param.GetType().Name != "ColorParameter") continue;
|
|
404
407
|
targetParameter = param;
|
|
405
408
|
break;
|
|
406
409
|
}
|
|
410
|
+
|
|
411
|
+
break;
|
|
407
412
|
}
|
|
408
|
-
|
|
409
|
-
else if (propertyName == "saturation")
|
|
410
|
-
{
|
|
411
|
-
// Find saturation parameter - typically index 4 or by range check
|
|
412
|
-
if (parametersList.Count > 4 && parametersList[4].GetType().Name == "ClampedFloatParameter")
|
|
413
|
-
{
|
|
413
|
+
case "saturation" when parametersList.Count > 4 && parametersList[4].GetType().Name == "ClampedFloatParameter":
|
|
414
414
|
targetParameter = parametersList[4];
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
break;
|
|
416
|
+
case "saturation":
|
|
417
417
|
{
|
|
418
|
-
// Fallback: find ClampedFloatParameter with range -100 to 100
|
|
419
418
|
foreach (var param in parametersList)
|
|
420
419
|
{
|
|
421
|
-
if (param.GetType().Name
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
targetParameter = param;
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
420
|
+
if (param.GetType().Name != "ClampedFloatParameter") continue;
|
|
421
|
+
var paramType = param.GetType();
|
|
422
|
+
var minProp = paramType.GetProperty("min");
|
|
423
|
+
var maxProp = paramType.GetProperty("max");
|
|
424
|
+
if (minProp?.GetValue(param)?.ToString() != "-100" ||
|
|
425
|
+
maxProp?.GetValue(param)?.ToString() != "100") continue;
|
|
426
|
+
targetParameter = param;
|
|
427
|
+
break;
|
|
433
428
|
}
|
|
429
|
+
|
|
430
|
+
break;
|
|
434
431
|
}
|
|
435
432
|
}
|
|
436
|
-
|
|
437
|
-
if (targetParameter
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
valueProperty.SetValue(targetParameter, value);
|
|
445
|
-
if (_isDebugSTATIC) Debug.Log($"FadeMask: Set {propertyName} to {value}");
|
|
446
|
-
}
|
|
447
|
-
}
|
|
433
|
+
|
|
434
|
+
if (targetParameter == null) return;
|
|
435
|
+
var parameterType = targetParameter.GetType();
|
|
436
|
+
var valueProperty = parameterType.GetProperty("value");
|
|
437
|
+
|
|
438
|
+
if (valueProperty == null) return;
|
|
439
|
+
valueProperty.SetValue(targetParameter, value);
|
|
440
|
+
if (_isDebugSTATIC) Debug.Log($"FadeMask: Set {propertyName} to {value}");
|
|
448
441
|
}
|
|
449
442
|
catch (Exception e)
|
|
450
443
|
{
|
|
@@ -466,35 +459,52 @@ namespace jeanf.universalplayer
|
|
|
466
459
|
|
|
467
460
|
private void ChangePostProcessing(bool isInitComplete)
|
|
468
461
|
{
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
if (!isInitComplete) return;
|
|
472
|
-
|
|
473
|
-
SetVolumeTo_HeadInWallSetup();
|
|
462
|
+
SetVolumeTo_FadeToBlack();
|
|
474
463
|
}
|
|
475
|
-
|
|
476
464
|
public static void FadeValue(bool value)
|
|
477
465
|
{
|
|
478
|
-
FadeValue(value,
|
|
479
|
-
if (_isDebugSTATIC) Debug.Log($"FadeMask: Fading to {value} in {_fadeTime}s");
|
|
466
|
+
FadeValue(value, FadeType.Loading);
|
|
480
467
|
}
|
|
481
468
|
|
|
482
469
|
public static void FadeValue(bool value, float fadeTime)
|
|
483
470
|
{
|
|
484
|
-
|
|
471
|
+
FadeValue(value, fadeTime, FadeType.Loading);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
public static void FadeValue(bool value, FadeType fadeType)
|
|
475
|
+
{
|
|
476
|
+
FadeValue(value, _fadeTime, fadeType);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
public static void FadeValue(bool value, float fadeTime, FadeType fadeType)
|
|
480
|
+
{
|
|
485
481
|
if (staticPostProcessVolume == null)
|
|
486
482
|
{
|
|
487
483
|
if (_isDebugSTATIC) Debug.LogWarning("FadeMask: staticPostProcessVolume is null. Make sure FadeMask.Awake() has been called.");
|
|
488
484
|
return;
|
|
489
485
|
}
|
|
490
486
|
|
|
491
|
-
|
|
487
|
+
if (value)
|
|
488
|
+
{
|
|
489
|
+
_currentFadeType = fadeType;
|
|
490
|
+
switch (fadeType)
|
|
491
|
+
{
|
|
492
|
+
case FadeType.Loading:
|
|
493
|
+
SetVolumeTo_FadeToBlack(); // Black fade
|
|
494
|
+
break;
|
|
495
|
+
case FadeType.HeadInWall:
|
|
496
|
+
SetVolumeTo_FadeSaturation(); // Saturation fade
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
if (_isDebugSTATIC) Debug.Log($"FadeMask: Setting up {fadeType} fade");
|
|
501
|
+
}
|
|
502
|
+
|
|
492
503
|
if (_isCurrentlyFading && _targetState == value)
|
|
493
504
|
return;
|
|
494
505
|
|
|
495
|
-
if (_isDebugSTATIC) Debug.Log($"FadeMask: Fading to {value} in {fadeTime}s");
|
|
506
|
+
if (_isDebugSTATIC) Debug.Log($"FadeMask: Fading to {value} in {fadeTime}s with {fadeType} style");
|
|
496
507
|
|
|
497
|
-
// Only cancel if the handle is valid and active
|
|
498
508
|
if (_fadeHandle.IsActive())
|
|
499
509
|
{
|
|
500
510
|
_fadeHandle.Cancel();
|
|
@@ -42,8 +42,20 @@ namespace jeanf.universalplayer
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (_isHeadInWall == _isHeadInWallLastValue) return;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
|
|
46
|
+
// Determine fade type based on whether we're loading or detecting collision
|
|
47
|
+
if (_isSceneLoading)
|
|
48
|
+
{
|
|
49
|
+
// Black fade for loading
|
|
50
|
+
FadeMask.FadeValue(_isHeadInWall, FadeMask.FadeType.Loading);
|
|
51
|
+
if (isDebug) Debug.Log($"Loading fade changed to: {_isHeadInWall}");
|
|
52
|
+
}
|
|
53
|
+
else
|
|
54
|
+
{
|
|
55
|
+
// Gray fade for head-in-wall collision
|
|
56
|
+
FadeMask.FadeValue(_isHeadInWall, FadeMask.FadeType.HeadInWall);
|
|
57
|
+
if (isDebug) Debug.Log($"HeadInWall collision fade changed to: {_isHeadInWall}");
|
|
58
|
+
}
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
#if UNITY_EDITOR
|
|
@@ -54,10 +66,25 @@ namespace jeanf.universalplayer
|
|
|
54
66
|
}
|
|
55
67
|
#endif
|
|
56
68
|
|
|
57
|
-
public static void SetIsLoadingState(bool
|
|
69
|
+
public static void SetIsLoadingState(bool isLoading)
|
|
70
|
+
{
|
|
71
|
+
_isSceneLoading = isLoading;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// <summary>
|
|
75
|
+
/// Gets the current loading state
|
|
76
|
+
/// </summary>
|
|
77
|
+
public static bool IsCurrentlyLoading()
|
|
78
|
+
{
|
|
79
|
+
return _isSceneLoading;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// <summary>
|
|
83
|
+
/// Gets the current head-in-wall state (useful for debugging)
|
|
84
|
+
/// </summary>
|
|
85
|
+
public bool IsHeadInWall()
|
|
58
86
|
{
|
|
59
|
-
|
|
60
|
-
_isSceneLoading = value;
|
|
87
|
+
return _isHeadInWall;
|
|
61
88
|
}
|
|
62
89
|
}
|
|
63
90
|
}
|