The GetVector4
method retrieves a Vector4
value associated with a specified StringToken
key from the RenderAttributes
collection. If the key does not exist, it returns a default value provided by the caller.
The GetVector4
method retrieves a Vector4
value associated with a specified StringToken
key from the RenderAttributes
collection. If the key does not exist, it returns a default value provided by the caller.
To use the GetVector4
method, you need to have an instance of the RenderAttributes
class. Call the method with a StringToken
representing the key and a Vector4
that serves as the default value if the key is not found.
Example usage:
RenderAttributes renderAttributes = new RenderAttributes();
StringToken key = new StringToken("myVector4Key");
Vector4 defaultValue = new Vector4(1.0f, 1.0f, 1.0f, 1.0f);
Vector4 result = renderAttributes.GetVector4(ref key, ref defaultValue);
RenderAttributes renderAttributes = new RenderAttributes(); StringToken key = new StringToken("myVector4Key"); Vector4 defaultValue = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); Vector4 result = renderAttributes.GetVector4(ref key, ref defaultValue);