protected static bool ParseParamNamedAuto( string parameters, MaterialScriptContext context )
{
// skip this if the program is not supported or could not be found
if ( context.program == null || !context.program.IsSupported )
{
return false;
}
string[] values = parameters.Split( new char[] { ' ', '\t' } );
if ( values.Length != 2 && values.Length != 3 )
{
LogParseError( context, "Invalid param_named_auto attribute - expected 2 or 3 parameters." );
return false;
}
// get start index
try
{
int index = context.programParams.GetParamIndex( values[ 0 ] );
ProcessAutoProgramParam( index, "param_named_auto", values, context );
}
catch ( Exception ex )
{
LogParseError( context, "Invalid param_named_auto attribute - {0}.", ex.Message );
return false;
}
return false;
}