/// <summary> /// Creates and returns a new <see cref="VolumeStack"/> to use when you need to store /// the result of the Volume blending pass in a separate stack. /// </summary> /// <returns></returns> /// <seealso cref="VolumeStack"/> /// <seealso cref="Update(VolumeStack,Transform,LayerMask)"/> public VolumeStack CreateStack() { var stack = new VolumeStack(); stack.Reload(baseComponentTypes); return(stack); }
public void CheckStack(VolumeStack stack) { // The editor doesn't reload the domain when exiting play mode but still kills every // object created while in play mode, like stacks' component states var components = stack.components; if (components == null) { stack.Reload(baseComponentTypes); return; } foreach (var kvp in components) { if (kvp.Key == null || kvp.Value == null) { stack.Reload(baseComponentTypes); return; } } }