static public ShaderInput GetShaderInput(BlackboardShaderInputOrder order) { ShaderInput output; if (order.isKeyword) { if (order.builtInKeyword == null) { output = new ShaderKeyword(order.keywordType); } else { output = order.builtInKeyword; } } else if (order.isDropdown) { output = new ShaderDropdown(); } else { switch (order.deprecatedPropertyName) { case "Color": output = new ColorShaderProperty(order.version); break; default: output = null; AssertHelpers.Fail("BlackboardShaderInputFactory: Unknown deprecated property type."); break; } } return(output); }
public static AddShaderInputAction AddKeywordAction(BlackboardShaderInputOrder order) { return(new() { shaderInputReference = BlackboardShaderInputFactory.GetShaderInput(order), addInputActionType = AddShaderInputAction.AddActionSource.AddMenu }); }