Graphic
The Graphic class is a component which interacts with Unity Images on UI.
To get a Graphic from an item, use the GetComponent method.
let graphicComponent = item.GetComponent("Graphic")
You can then use the graphicComponent
property to access the Graphic class.
Methods
Method Name | Return Type | Parameters | Description |
---|---|---|---|
SetImageFromAsset | void | string | Sets the image's texture from the World's Resources |
SetImageFromTexture | void | Texture | Sets the image from a Texture object |
Properties
Property Name | Type | Description |
---|---|---|
Enabled | bool | Checks the active state of the component |
RawEnabled | bool | Checks the active state of the RawImage component |