public PopupAttribute(PopupSource sourceType, string methodName, ShaderPropType shaderPropType, bool hideLabel) { this.sourceType = sourceType; this.methodName = methodName; this.shaderPropType = shaderPropType; this.hideLabel = hideLabel; }
/// <summary> /// An alternative [Popup] signature that avoids enums to compile with U# /// </summary> /// <param name="sourceType">Can be "method", "animator", "behaviour" or "shader"</param> /// <param name="methodName"></param> /// <param name="hideLabel"></param> /// <param name="shaderPropType">Can be "float", "color" or "vector"</param> public PopupAttribute(string sourceType, string methodName, string shaderPropType, bool hideLabel) { this.sourceType = sourcesMap.ContainsKey(sourceType) ? sourcesMap[sourceType] : PopupSource.Method; this.shaderPropType = shaderPropsMap.ContainsKey(shaderPropType) ? shaderPropsMap[shaderPropType] : ShaderPropType.Float; this.hideLabel = hideLabel; this.methodName = methodName; }
public PopupAttribute(PopupSource sourceType, string methodName, ShaderPropType shaderPropType) { this.sourceType = sourceType; this.methodName = methodName; this.shaderPropType = shaderPropType; }