ButtonBackgroundSizeOffset Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This component is no longer supported
Scales an object relative the scale of the Anchor Transform Works best when using with Layout3DPixelSize, but not required - See LayoutPixelSize for more info Use Case: Create a button, then add another element who's size should maintain a consistent size relative to the Anchor. Like creating a button background using a Cube and ButtonSize. The add another Cube that is 40 pixels smaller than the background. Event if the background changes size, this element will remain 40 pixels smaller.
public ref class ButtonBackgroundSizeOffset : UnityEngine::MonoBehaviour
[System.Obsolete("This component is no longer supported", true)]
[UnityEngine.AddComponentMenu("Scripts/MRTK/Obsolete/ButtonBackgroundSizeOffset")]
[UnityEngine.ExecuteInEditMode]
public class ButtonBackgroundSizeOffset : UnityEngine.MonoBehaviour
[<System.Obsolete("This component is no longer supported", true)>]
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Obsolete/ButtonBackgroundSizeOffset")>]
[<UnityEngine.ExecuteInEditMode>]
type ButtonBackgroundSizeOffset = class
inherit MonoBehaviour
Public Class ButtonBackgroundSizeOffset
Inherits MonoBehaviour
- Inheritance
-
UnityEngine.MonoBehaviourButtonBackgroundSizeOffset
- Attributes
Constructors
ButtonBackgroundSizeOffset() |
Methods
GetScale() | |
GetSOffset() |
Get the current offset value |
SetOffset(Vector3) |
Set a consistent offset value from the Anchor |
SetScale(Vector3) |
Set the objects scale relative to the Anchor |