
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace UnityEditor.ShaderGraph
|
|
{
|
|
[GenerationAPI]
|
|
internal class TargetFieldContext
|
|
{
|
|
public List<ConditionalField> conditionalFields { get; private set; }
|
|
public PassDescriptor pass { get; private set; }
|
|
public List<(BlockFieldDescriptor descriptor, bool isDefaultValue)> blocks { get; private set; }
|
|
public List<BlockFieldDescriptor> 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<BlockFieldDescriptor> connectedBlocks, bool hasDotsProperties)
|
|
{
|
|
conditionalFields = new List<ConditionalField>();
|
|
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));
|
|
}
|
|
}
|
|
}
|