|
|
|
|
|
|
// Look for existing cached layer masks and add it there if needed
|
|
|
|
foreach (var kvp in m_SortedVolumes) |
|
|
|
{ |
|
|
|
var mask = kvp.Key; |
|
|
|
|
|
|
|
if ((mask & (1 << layer)) != 0) |
|
|
|
if ((kvp.Key & (1 << layer)) != 0) |
|
|
|
kvp.Value.Add(volume); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var kvp in m_SortedVolumes) |
|
|
|
{ |
|
|
|
var mask = kvp.Key; |
|
|
|
|
|
|
|
if ((mask & (1 << layer)) == 0) |
|
|
|
if ((kvp.Key & (1 << layer)) == 0) |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsComponentActiveInMask<T>(LayerMask layerMask) |
|
|
|
where T : VolumeComponent |
|
|
|
{ |
|
|
|
int mask = layerMask.value; |
|
|
|
|
|
|
|
foreach (var kvp in m_SortedVolumes) |
|
|
|
{ |
|
|
|
if ((kvp.Key & mask) == 0) |
|
|
|
continue; |
|
|
|
|
|
|
|
foreach (var volume in kvp.Value) |
|
|
|
{ |
|
|
|
T component; |
|
|
|
if (volume.TryGet(out component) && component.active) |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
internal void SetLayerDirty(int layer) |
|
|
|