Axiom.Serialization.MaterialSerializer.ParseParamNamed C# (CSharp) Метод

ParseParamNamed() приватный Метод

private ParseParamNamed ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		protected static bool ParseParamNamed( 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 < 3 )
			{
				LogParseError( context, "Invalid param_named attribute - expected at least 3 parameters." );
				return false;
			}

			// get start index
			try
			{
				int index = context.programParams.GetParamIndex( values[ 0 ] );

				ProcessManualProgramParam( index, "param_named", values, context );
			}
			catch ( Exception ex )
			{
				LogParseError( context, "Invalid param_named attribute - {0}.", ex.Message );
				return false;
			}

			return false;
		}