float UniformScale { get; set; }

book_4_sparkGenerated
code_blocksInput

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 or modify 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 a uniform scale for a Transform object. This is useful when you want to apply the same scaling factor to all dimensions of the transform.

Example

// Example of setting a uniform scale
Transform transform = new Transform();
transform.UniformScale = 2.0f;

// Accessing the uniform scale
float scale = transform.UniformScale;

// This will scale the transform uniformly across all axes by a factor of 2.