Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 4b7975c

Browse files
committed
Changed LayerMask to int to use implicit casts and avoid GC pressure
LayerMask isn't properly implemented (no GetHashCode etc).
1 parent 1a362b0 commit 4b7975c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

PostProcessing/Runtime/PostProcessManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public static PostProcessManager instance
2323
}
2424

2525
const int k_MaxLayerCount = 32; // Max amount of layers available in Unity
26-
readonly Dictionary<LayerMask, List<PostProcessVolume>> m_SortedVolumes;
26+
readonly Dictionary<int, List<PostProcessVolume>> m_SortedVolumes;
2727
readonly List<PostProcessVolume> m_Volumes;
28-
readonly Dictionary<LayerMask, bool> m_SortNeeded;
28+
readonly Dictionary<int, bool> m_SortNeeded;
2929
readonly List<PostProcessEffectSettings> m_BaseSettings;
3030
readonly List<Collider> m_TempColliders;
3131

3232
public readonly Dictionary<Type, PostProcessAttribute> settingsTypes;
3333

3434
PostProcessManager()
3535
{
36-
m_SortedVolumes = new Dictionary<LayerMask, List<PostProcessVolume>>();
36+
m_SortedVolumes = new Dictionary<int, List<PostProcessVolume>>();
3737
m_Volumes = new List<PostProcessVolume>();
38-
m_SortNeeded = new Dictionary<LayerMask, bool>();
38+
m_SortNeeded = new Dictionary<int, bool>();
3939
m_BaseSettings = new List<PostProcessEffectSettings>();
4040
m_TempColliders = new List<Collider>(5);
4141

0 commit comments

Comments
 (0)