Click or drag to resize

TransformValues Structure

This is a data struct to easily cache off Transform values. Unfortunately it needs to exist because you can't have a Transform exist without creating a GameObject as well, and that's way too much overhead to do this frequently.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public struct TransformValues : IEquatable<TransformValues>

The TransformValues type exposes the following members.

Constructors
  NameDescription
Public methodTransformValues(Transform)
Constructor that caches the values of a Transform without creating a GameObject.
Public methodTransformValues(TransformValues)
Constructor that uses another TransformValues as a constructor
Public methodTransformValues(Vector3, Quaternion, Vector3)
Constructor that uses raw values. Assumes this is not storing values of a RectTransform.
Public methodTransformValues(Vector3, Quaternion, Vector3, Vector2, Vector2, Vector3, Vector2, Vector2)
Constructor that uses raw values. This constructor assumes we are storing values of a RectTransform.
Top
Properties
  NameDescription
Public propertyHasSetValues
Can be used to determine if one of the constructors has been called, and the values were successfully cached.
Top
Methods
  NameDescription
Public methodEquals
Checks if the values of two TransformValues are equal to one another.
Public methodSetTransformToCachedValues
Sets a Transform to the cached values.
Top
Fields
  NameDescription
Public fieldAnchoredPosition3D
The 3D position of the pivot of this RectTransform relative to the anchor reference point.
Public fieldAnchorMax
The normalized position in the parent RectTransform that the upper right corner is anchored to.
Public fieldAnchorMin
The normalized position in the parent RectTransform that the lower left corner is anchored to.
Public fieldIsRectTransform
Whether or not these values came from a RectTransform
Public fieldLocalScale
The scale of the Transform relative to the parent.
Public fieldPivot
The normalized position in this RectTransform that it rotates around.
Public fieldPosition
The position of the Transform in world space.
Public fieldRotation
The rotation of the Transform in world space stored as a Quaternion.
Public fieldRotationEuler
The rotation as Euler angles in degrees.
Public fieldSizeDelta
The size of this RectTransform relative to the distances between the anchors.
Top
See Also