public bool IsInputCategorized(ShaderInput shaderInput) { foreach (var category in categories) { if (category.IsItemInCategory(shaderInput)) { return(true); } } return(false); }
// The only situation in which an input has an identical reference name to another input in a category, while not being the same instance, is if they are duplicates public bool IsInputDuplicatedFromCategory(ShaderInput shaderInput, CategoryData inputCategory, GraphData targetGraphData) { foreach (var child in inputCategory.Children) { if (child.referenceName.Equals(shaderInput.referenceName, StringComparison.Ordinal) && child.objectId != shaderInput.objectId) { return(true); } } // Need to check if they share same graph owner as well, if not then we can early out bool inputBelongsToTargetGraph = targetGraphData.ContainsInput(shaderInput); if (inputBelongsToTargetGraph == false) { return(false); } return(false); }
public string GetConnectionStateVariableNameForSlot(int slotId) { return(ShaderInput.GetConnectionStateVariableName(GetVariableNameForSlot(slotId))); }
void AddInput(ShaderInput input) { m_Inputs.Add(input); }