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. The property is marked with the JsonIgnore
attribute, indicating that it should be ignored during JSON serialization.
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
Transform transform = new Transform();
// Set the uniform scale
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}");