using System.Collections.Generic; namespace UnityEditor.ShaderGraph { [GenerationAPI] internal class TargetFieldContext { public List conditionalFields { get; private set; } public PassDescriptor pass { get; private set; } public List<(BlockFieldDescriptor descriptor, bool isDefaultValue)> blocks { get; private set; } public List connectedBlocks { get; private set; } public bool hasDotsProperties { get; private set; } // NOTE: active blocks (and connectedBlocks) do not include temporarily added default blocks public TargetFieldContext(PassDescriptor pass, List<(BlockFieldDescriptor descriptor, bool isDefaultValue)> activeBlocks, List connectedBlocks, bool hasDotsProperties) { conditionalFields = new List(); this.pass = pass; this.blocks = activeBlocks; this.connectedBlocks = connectedBlocks; this.hasDotsProperties = hasDotsProperties; } public void AddField(FieldDescriptor field, bool conditional = true) { conditionalFields.Add(new ConditionalField(field, conditional)); } } }