Struct WeightedTransform
Tuple of a Reference to a Transform component and a weight number. See also WeightedTransformArray and WeightRangeAttribute.
Inherited Members
Namespace: UnityEngine.Animations.Rigging
Assembly: Unity.Animation.Rigging.dll
Syntax
[Serializable]
public struct WeightedTransform : ITransformProvider, IWeightProvider, IEquatable<WeightedTransform>
Constructors
WeightedTransform(Transform, float)
Constructor.
Declaration
public WeightedTransform(Transform transform, float weight)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | Reference to a Transform component. |
float | weight | Weight. This is a number in between 0 and 1. |
Fields
transform
Reference to a Transform component.
Declaration
public Transform transform
Field Value
Type | Description |
---|---|
Transform |
weight
Weight. This is a number be in between 0 and 1.
Declaration
public float weight
Field Value
Type | Description |
---|---|
float |
Methods
Default(float)
Returns a WeightedTransform object with an null Transform component reference and the specified weight.
Declaration
public static WeightedTransform Default(float weight)
Parameters
Type | Name | Description |
---|---|---|
float | weight | Weight. This is a number in between 0 and 1. |
Returns
Type | Description |
---|---|
WeightedTransform | Returns a new WeightedTransform |
Equals(WeightedTransform)
Compare two WeightedTransform objects for equality.
Declaration
public bool Equals(WeightedTransform other)
Parameters
Type | Name | Description |
---|---|---|
WeightedTransform | other | A WeightedTransform object |
Returns
Type | Description |
---|---|
bool | Returns true if both WeightedTransform have the same values. False otherwise. |