Breakroom is now Sinewave Campus. Book a meeting

SUIImage

ClientComposants
Dans cette classeColor
  1. Propriétés
  2. Color
  3. Sprite
  4. PreserveAspect
  5. FillCenter
  6. FillAmount
  7. FillClockwise
  8. FillOrigin
  9. AlphaHitTestMinimumThreshold
  10. HasBorder
  11. PixelsPerUnit
  12. Material
  13. MinWidth
  14. PreferredWidth
  15. FlexibleWidth
  16. MinHeight
  17. PreferredHeight
  18. FlexibleHeight
  19. LayoutPriority
  20. GameObject
Membres 19
PropriétéColorDefault Color of UIImage
PropriétéSpriteThe sprite that is used to render this image.
PropriétéPreserveAspectWhether this image should preserve its Sprite aspect ratio.
PropriétéFillCenterWhether or not to render the center
PropriétéFillAmountAmount of the Image shown
PropriétéFillClockwiseWhether the Image should be filled clockwise (true) or counter-clockwise (false).
PropriétéFillOriginControls the origin point of the Fill process.
PropriétéAlphaHitTestMinimumThresholdThe alpha threshold specifies the minimum alpha a pixel must have for the event to considered a "hit" on the Image.
PropriétéHasBorderTrue if the sprite used has borders.
PropriétéPixelsPerUnitProvides information about how fonts are scale to the screen.
PropriétéMaterialThe specified Material used by this Image.
PropriétéMinWidthThe minimum width this UIImage may be allocated. (Used by the Layout system).
PropriétéPreferredWidthThe preferred width this UIImage should be allocated if there is sufficient space. (Used by the Layout system)
PropriétéFlexibleWidthThe extra relative width this UIImage should be allocated if there is additional available space. (Used by the Layout system)
PropriétéMinHeightThe minimum height this UIImage may be allocated.(Used by the Layout system).
PropriétéPreferredHeightThe preferred height this UIImage should be allocated if there is sufficient space. (Used by the Layout system)
PropriétéFlexibleHeightThe extra relative height this UIImage should be allocated if there is additional available space. (Used by the Layout system)
PropriétéLayoutPriorityThe layout priority of this UIText component.(Used by the Layout system.)
PropriétéGameObject–

Propriétés​

Color​

SColor Color {get; set; }

Default Color of UIImage

Exemple

Lua
Space.Host.ExecutingObject.UIImage.Color= Color.Red

Sprite​

SResource Sprite {get; set; }

The sprite that is used to render this image.

Exemple

Lua
Space.Host.ExecutingObject.UIImage.Sprite = Space.GetResource("resource name")

PreserveAspect​

bool PreserveAspect {get; set; }

Whether this image should preserve its Sprite aspect ratio.

Exemple

Lua
Space.Host.ExecutingObject.UIImage.PreserveAspect = true

FillCenter​

bool FillCenter {get; set; }

Whether or not to render the center

Exemple

Lua
Space.Host.ExecutingObject.UIImage.FillCenter = true

FillAmount​

float FillAmount {get; set; }

Amount of the Image shown

Exemple

Lua
Space.Host.ExecutingObject.UIImage.FillAmount = 0.5

FillClockwise​

bool FillClockwise {get; set; }

Whether the Image should be filled clockwise (true) or counter-clockwise (false).

Exemple

Lua
Space.Host.ExecutingObject.UIImage.FillClockwise = true

FillOrigin​

int FillOrigin {get; set; }

Controls the origin point of the Fill process.

Exemple

Lua
Space.Host.ExecutingObject.UIImage.FillOrigin = 0

AlphaHitTestMinimumThreshold​

float AlphaHitTestMinimumThreshold {get; set; }

The alpha threshold specifies the minimum alpha a pixel must have for the event to considered a "hit" on the Image. Alpha values less than the threshold will cause raycast events to pass through the Image. An value of 1 would cause only fully opaque pixels to register raycast events on the Image. The alpha tested is retrieved from the image sprite only, while the alpha of the Image Graphic.color is disregarded.

alphaHitTestMinimumThreshold defaults to 0; all raycast events inside the Image rectangle are considered a hit. In order for greater than 0 to values to work, the sprite used by the Image must have readable pixels. This can be achieved by enabling Read/Write enabled in the advanced Texture Import Settings for the sprite and disabling atlassing for the sprite.

Exemple

Lua
Space.Host.ExecutingObject.UIImage.AlphaHitTestMinimumThreshold = 0

HasBorderLecture seule​

bool HasBorder {get; }

True if the sprite used has borders.

Exemple

Lua
imgHasBorder = Space.Host.ExecutingObject.UIImage.HasBorder

PixelsPerUnitLecture seule​

float PixelsPerUnit {get; }

Provides information about how fonts are scale to the screen.

For dynamic fonts, the value is equivalent to the scale factor of the canvas. For non-dynamic fonts, the value is calculated from the requested text size and the size from the font.

Exemple

Lua
ppUnit = Space.Host.ExecutingObject.UIImage.PixelsPerUnit

Material​

SMaterial Material {get; set; }

The specified Material used by this Image. The default Material is used instead if one wasn't specified.

Exemple

Lua
Space.Host.ExecutingObject.UIImage.Material = Space.GetResource("resource name").AsMaterial

MinWidthLecture seule​

float MinWidth {get; }

The minimum width this UIImage may be allocated. (Used by the Layout system).

Exemple

Lua
minWidth = Space.Host.ExecutingObject.UIImage.MinWidth

PreferredWidthLecture seule​

float PreferredWidth {get; }

The preferred width this UIImage should be allocated if there is sufficient space. (Used by the Layout system)

Exemple

Lua
prefWidth = Space.Host.ExecutingObject.UIImage.PreferredWidth

FlexibleWidthLecture seule​

float FlexibleWidth {get; }

The extra relative width this UIImage should be allocated if there is additional available space. (Used by the Layout system)

Exemple

Lua
flexWidth = Space.Host.ExecutingObject.UIImage.FlexibleWidth

MinHeightLecture seule​

float MinHeight {get; }

The minimum height this UIImage may be allocated.(Used by the Layout system).

Exemple

Lua
minHeight = Space.Host.ExecutingObject.UIImage.MinHeight

PreferredHeightLecture seule​

float PreferredHeight {get; }

The preferred height this UIImage should be allocated if there is sufficient space. (Used by the Layout system)

Exemple

Lua
prefHeight = Space.Host.ExecutingObject.UIImage.PreferredHeight

FlexibleHeightLecture seule​

float FlexibleHeight {get; }

The extra relative height this UIImage should be allocated if there is additional available space. (Used by the Layout system)

Exemple

Lua
flexHeight = Space.Host.ExecutingObject.UIImage.FlexibleHeight

LayoutPriorityLecture seule​

int LayoutPriority {get; }

The layout priority of this UIText component.(Used by the Layout system.)

Exemple

Lua
layoutPrio = Space.Host.ExecutingObject.UIImage.LayoutPriority

GameObjectLecture seule​

SGameObject GameObject {get; }

Exemple

Lua
theGameObject = Space.Host.ExecutingObject.UIImage.GameObject