image
The icon image contained.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.IMGUIModule
public Texture image { get; set; }
Examples
using UnityEngine;public class ExampleScript : MonoBehaviour{ public Texture icon; void OnGUI() { if (!icon) { Debug.LogError("Add a texture on the inspector first"); return; } GUI.Button(new Rect(0, 0, 100, 20), new GUIContent(icon)); }}