Description
The UniformScale
property of the Transform
struct represents a uniform scaling factor applied to the transform. This property is typically used when the scale is uniform across all axes, allowing you to access the scale using a single float value, specifically the x component of the scale vector.
Usage
Use the UniformScale
property to get or set the uniform scale of a Transform
object. This is useful when you want to apply the same scaling factor to all dimensions of an object.
Example
// Example of setting and getting the UniformScale property
// Create a new Transform instance
Transform transform = new Transform();
// Set the uniform scale to 2.0
transform.UniformScale = 2.0f;
// Get the uniform scale
float scale = transform.UniformScale;
// Output the scale
// Note: Avoid using Console.WriteLine in s&box
// Instead, use logging or debugging tools provided by the engine
// Log.Info($"Uniform Scale: {scale}");