Vector3 GetVector( Sandbox.StringToken& name, Vector3& defaultValue )

book_4_sparkGenerated
code_blocksInput

Description

The GetVector method retrieves a Vector3 value associated with a specified StringToken from the RenderAttributes class. If the specified token does not exist, the method returns a default value provided by the caller.

Usage

To use the GetVector method, you need to provide a StringToken that identifies the attribute you want to retrieve and a Vector3 that serves as the default value if the attribute is not found.

Example usage:

RenderAttributes renderAttributes = new RenderAttributes();
StringToken token = new StringToken("position");
Vector3 defaultPosition = new Vector3(0, 0, 0);
Vector3 position = renderAttributes.GetVector(ref token, ref defaultPosition);

Example

RenderAttributes renderAttributes = new RenderAttributes();
StringToken token = new StringToken("position");
Vector3 defaultPosition = new Vector3(0, 0, 0);
Vector3 position = renderAttributes.GetVector(ref token, ref defaultPosition);