Skip to content

Commit 6372da0

Browse files
FredMoreauEvergreen
authored andcommitted
FIX : VFX Samples to support Cinemachine 3.x
Cinemachine asmdefs and namespaces have changed between 2.x and 3.x, causing issues when importing VFX Graph VFXOutputEventHandlers Sample. Updated asmdefs and C# files to account for changes made in Cinemachine 3.x
1 parent c09bcff commit 6372da0

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

Packages/com.unity.visualeffectgraph/Samples~/VFXOutputEventHandlers/Editor/Unity.VisualEffectGraph.OutputEventHandlers.asmdef

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"Unity.VisualEffectGraph.Runtime",
66
"Unity.RenderPipelines.HighDefinition.Runtime",
77
"Cinemachine",
8+
"Unity.Cinemachine",
89
"VFXGraph.OutputEventHandlers"
910
],
1011
"includePlatforms": [
@@ -27,6 +28,11 @@
2728
"expression": "2.6.0",
2829
"define": "VFX_OUTPUTEVENT_CINEMACHINE_2_6_0_OR_NEWER"
2930
},
31+
{
32+
"name": "com.unity.cinemachine",
33+
"expression": "3.0.0",
34+
"define": "VFX_OUTPUTEVENT_CINEMACHINE_3_0_0_OR_NEWER"
35+
},
3036
{
3137
"name": "com.unity.modules.physics",
3238
"expression": "1.0.0",

Packages/com.unity.visualeffectgraph/Samples~/VFXOutputEventHandlers/Runtime/Unity.VisualEffectGraph.OutputEventHandlers.asmdef

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"references": [
55
"Unity.VisualEffectGraph.Runtime",
66
"Unity.RenderPipelines.HighDefinition.Runtime",
7-
"Cinemachine"
7+
"Cinemachine",
8+
"Unity.Cinemachine"
89
],
910
"includePlatforms": [],
1011
"excludePlatforms": [],
@@ -24,6 +25,11 @@
2425
"expression": "2.6.0",
2526
"define": "VFX_OUTPUTEVENT_CINEMACHINE_2_6_0_OR_NEWER"
2627
},
28+
{
29+
"name": "com.unity.cinemachine",
30+
"expression": "3.0.0",
31+
"define": "VFX_OUTPUTEVENT_CINEMACHINE_3_0_0_OR_NEWER"
32+
},
2733
{
2834
"name": "com.unity.modules.physics",
2935
"expression": "1.0.0",

Packages/com.unity.visualeffectgraph/Samples~/VFXOutputEventHandlers/Runtime/VFXOutputEventCinemachineCameraShake.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#if VFX_OUTPUTEVENT_CINEMACHINE_2_6_0_OR_NEWER
2+
3+
#if VFX_OUTPUTEVENT_CINEMACHINE_3_0_0_OR_NEWER
4+
using Unity.Cinemachine;
5+
#else
26
using Cinemachine;
7+
#endif
38

49
namespace UnityEngine.VFX.Utility
510
{

0 commit comments

Comments
 (0)