fr.jeanf.universal.player 0.8.4 → 0.8.6
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.
|
@@ -1009,6 +1009,7 @@ MonoBehaviour:
|
|
|
1009
1009
|
m_Script: {fileID: 11500000, guid: 870d6a39371c636478cc8124cdbf4bcc, type: 3}
|
|
1010
1010
|
m_Name:
|
|
1011
1011
|
m_EditorClassIdentifier:
|
|
1012
|
+
isDebug: 0
|
|
1012
1013
|
tmp: {fileID: 6613360146104973944}
|
|
1013
1014
|
--- !u!1 &1084467950943283014
|
|
1014
1015
|
GameObject:
|
|
@@ -5953,6 +5954,7 @@ GameObject:
|
|
|
5953
5954
|
- component: {fileID: 9026189532706801214}
|
|
5954
5955
|
- component: {fileID: 7126930088852696200}
|
|
5955
5956
|
- component: {fileID: 832026718078124461}
|
|
5957
|
+
- component: {fileID: 2281943750679968935}
|
|
5956
5958
|
m_Layer: 2
|
|
5957
5959
|
m_Name: Player
|
|
5958
5960
|
m_TagString: Player
|
|
@@ -6541,6 +6543,20 @@ MonoBehaviour:
|
|
|
6541
6543
|
duration: 0.2
|
|
6542
6544
|
hapticFeedbackOnSpecificHandSO: {fileID: 11400000, guid: d3e22cdb3c9760a44b85404ff348f6ee,
|
|
6543
6545
|
type: 2}
|
|
6546
|
+
--- !u!114 &2281943750679968935
|
|
6547
|
+
MonoBehaviour:
|
|
6548
|
+
m_ObjectHideFlags: 0
|
|
6549
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
6550
|
+
m_PrefabInstance: {fileID: 0}
|
|
6551
|
+
m_PrefabAsset: {fileID: 0}
|
|
6552
|
+
m_GameObject: {fileID: 8694773027870397994}
|
|
6553
|
+
m_Enabled: 1
|
|
6554
|
+
m_EditorHideFlags: 0
|
|
6555
|
+
m_Script: {fileID: 11500000, guid: 870d6a39371c636478cc8124cdbf4bcc, type: 3}
|
|
6556
|
+
m_Name:
|
|
6557
|
+
m_EditorClassIdentifier:
|
|
6558
|
+
isDebug: 1
|
|
6559
|
+
tmp: {fileID: 0}
|
|
6544
6560
|
--- !u!1 &8761714896230907912
|
|
6545
6561
|
GameObject:
|
|
6546
6562
|
m_ObjectHideFlags: 0
|
|
@@ -4,6 +4,8 @@ using jeanf.EventSystem;
|
|
|
4
4
|
using UnityEngine.Serialization;
|
|
5
5
|
using UnityEngine.Rendering;
|
|
6
6
|
using LitMotion;
|
|
7
|
+
using UnityEngine.Rendering.HighDefinition;
|
|
8
|
+
using Volume = UnityEngine.Rendering.Volume;
|
|
7
9
|
|
|
8
10
|
namespace jeanf.universalplayer
|
|
9
11
|
{
|
|
@@ -37,6 +39,7 @@ namespace jeanf.universalplayer
|
|
|
37
39
|
[SerializeField] private VolumeProfile URPVolumeProfile;
|
|
38
40
|
[SerializeField] private Volume postProcessVolume;
|
|
39
41
|
private static Volume staticPostProcessVolume;
|
|
42
|
+
private ColorAdjustments colorAdjustments;
|
|
40
43
|
|
|
41
44
|
private static MotionHandle _fadeHandle;
|
|
42
45
|
private static bool _isCurrentlyFading = false;
|
|
@@ -44,7 +47,10 @@ namespace jeanf.universalplayer
|
|
|
44
47
|
|
|
45
48
|
[Header("Listening On")]
|
|
46
49
|
[SerializeField] private BoolFloatEventChannelSO fadeOutChannelSO;
|
|
47
|
-
|
|
50
|
+
|
|
51
|
+
public delegate void TogglePPEDelegatte(bool state);
|
|
52
|
+
public static TogglePPEDelegatte TogglePPE;
|
|
53
|
+
|
|
48
54
|
|
|
49
55
|
private void Awake()
|
|
50
56
|
{
|
|
@@ -57,6 +63,10 @@ namespace jeanf.universalplayer
|
|
|
57
63
|
postProcessVolume.profile = URPVolumeProfile;
|
|
58
64
|
}
|
|
59
65
|
staticPostProcessVolume = postProcessVolume;
|
|
66
|
+
staticPostProcessVolume.profile.TryGet<ColorAdjustments>(out colorAdjustments);
|
|
67
|
+
colorAdjustments.colorFilter.value = Color.black;
|
|
68
|
+
colorAdjustments.saturation.value = 0;
|
|
69
|
+
|
|
60
70
|
FadeValue(false, .5f);
|
|
61
71
|
}
|
|
62
72
|
|
|
@@ -65,6 +75,7 @@ namespace jeanf.universalplayer
|
|
|
65
75
|
inputBinding.Enable();
|
|
66
76
|
inputBinding.performed += _ => SwitchFadeState();
|
|
67
77
|
fadeOutChannelSO.OnEventRaised += FadeValue;
|
|
78
|
+
TogglePPE += ChangePostProcessing;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
private void OnDisable() => Unsubscribe();
|
|
@@ -77,6 +88,7 @@ namespace jeanf.universalplayer
|
|
|
77
88
|
fadeOutChannelSO.OnEventRaised -= FadeValue;
|
|
78
89
|
inputBinding.Disable();
|
|
79
90
|
DisableFadeHandle();
|
|
91
|
+
TogglePPE -= ChangePostProcessing;
|
|
80
92
|
}
|
|
81
93
|
|
|
82
94
|
private void Update()
|
|
@@ -90,7 +102,19 @@ namespace jeanf.universalplayer
|
|
|
90
102
|
_isFaded = !_isFaded;
|
|
91
103
|
FadeValue(_isFaded);
|
|
92
104
|
}
|
|
105
|
+
|
|
106
|
+
private void ChangePostProcessing(bool isInitComplete)
|
|
107
|
+
{
|
|
108
|
+
colorAdjustments.colorFilter.value = Color.black;
|
|
109
|
+
colorAdjustments.saturation.value = 0;
|
|
110
|
+
|
|
111
|
+
if(!isInitComplete)return;
|
|
112
|
+
|
|
113
|
+
colorAdjustments.colorFilter.value = Color.white;
|
|
114
|
+
colorAdjustments.saturation.value = -100;
|
|
115
|
+
}
|
|
93
116
|
|
|
117
|
+
|
|
94
118
|
public static void FadeValue(bool value)
|
|
95
119
|
{
|
|
96
120
|
FadeValue(value, _fadeTime);
|
|
@@ -35,10 +35,10 @@ MonoBehaviour:
|
|
|
35
35
|
m_Value: 0
|
|
36
36
|
colorFilter:
|
|
37
37
|
m_OverrideState: 1
|
|
38
|
-
m_Value: {r:
|
|
38
|
+
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
|
39
39
|
hueShift:
|
|
40
40
|
m_OverrideState: 0
|
|
41
41
|
m_Value: 0
|
|
42
42
|
saturation:
|
|
43
|
-
m_OverrideState:
|
|
44
|
-
m_Value:
|
|
43
|
+
m_OverrideState: 1
|
|
44
|
+
m_Value: -100
|
package/package.json
CHANGED