SegmentDisplayImage
Derived from
SegmentDisplay
Image based SegmentDisplay to be used in UI.
Enums
public enum UIPositions | List of positions of SegmentDisplay inside UI RectTransform. |
Properties
public UIPositions UIPosition | Sets or gets position of the segment display inside RectTransform. |
Methods
public void CheckAndSetParent () | Check whatever this segment display object is child of UI Canvas and tries to set the parent if not. |
Enums
public enum UIPositions List of positions of SegmentDisplay inside UI RectTransform. Items | FillIgnoringAspectRatio | Fill whole rect, without keeping aspect ratio. | | UpperLeft | Set segment display to upper left corner of RectTransform. | | UpperCenter | Set segment display to upper center position of RectTransform. | | UpperRight | Set segment display to upper right corner of RectTransform. | | MiddleLeft | Set segment display to middle left position of RectTransform. | | MiddleCenter | Set segment display to middle center position of RectTransform. | | MiddleRight | Set segment display to middle right position of RectTransform. | | LowerLeft | Set segment display to lower left corner of RectTransform. | | LowerCenter | Set segment display to lower center position of RectTransform. | | LowerRight | Set segment display to lower right corner of RectTransform. |
Properties
public UIPositions UIPosition Sets or gets position of the segment display inside RectTransform. Value | One of the choices from enum UIPositions. |
Methods
public void CheckAndSetParent () Check whatever this segment display object is child of UI Canvas and tries to set the parent if not. If there is no canvas in scene hierarchy, this method will create one. If this object parent is changed, object's scale and anchored position will reset also. Note that this method is normally used only internally in Unity Editor and there is no need to call this when application is running. If you create new UI-type SegmentDisplay from prefab runtime, rather make sure your scene already contains Canvas and then use normal myUISegmentDisplay.transform.SetParent(myKnownCanvasOrOtherUIElement.transform) method to set parent like with any other UI object.
|