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

Commit 0726163

Browse files
committed
Added more options to GetActiveVolumes (see #399)
1 parent 9280902 commit 0726163

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PostProcessing/Runtime/PostProcessManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void ReloadBaseTypes()
9191

9292
// Gets a list of all volumes currently affecting the given layer. Results aren't sorted.
9393
// Volume with weight of 0 or no profile set will be skipped. Results list won't be cleared.
94-
public void GetActiveVolumes(PostProcessLayer layer, List<PostProcessVolume> results)
94+
public void GetActiveVolumes(PostProcessLayer layer, List<PostProcessVolume> results, bool skipDisabled = true, bool skipZeroWeight = true)
9595
{
9696
// If no trigger is set, only global volumes will have influence
9797
int mask = layer.volumeLayer.value;
@@ -106,7 +106,7 @@ public void GetActiveVolumes(PostProcessLayer layer, List<PostProcessVolume> res
106106
foreach (var volume in volumes)
107107
{
108108
// Skip disabled volumes and volumes without any data or weight
109-
if (!volume.enabled || volume.profileRef == null || volume.weight <= 0f)
109+
if ((skipDisabled && !volume.enabled) || volume.profileRef == null || (skipZeroWeight && volume.weight <= 0f))
110110
continue;
111111

112112
// Global volume always have influence

0 commit comments

Comments
 (0)