Game.UI.Debug.Image
Assembly: Assembly-CSharp (game code, confirm in your build)
Namespace: Game.UI.Debug
Type: class
Base: Game.UI.Widgets.NamedWidget
Summary:
A simple debug UI widget that represents an image source by a URI string. The widget exposes a public uri property (backed by a private field) and participates in the widget serialization pipeline by writing the "uri" property to the provided IJsonWriter. Setting the uri marks the widget's properties as changed so the UI system can react/update/serialize as needed.
Fields
private string m_Uri
Backs the public uri property. Defaults to null. Mutated only via the property setter so that change notifications (SetPropertiesChanged) are triggered.
Properties
public string uri { get; set; }
Public accessor for the image URI. The setter compares the new value to the current backing field and, when different, updates m_Uri and calls SetPropertiesChanged() (inherited from the widget base) to notify the UI system that the widget's properties have changed and may need re-rendering or re-serialization.
Constructors
public Image()
Compiler-generated default constructor. No custom initialization in the class source — any setup should be done by the caller or by overriding lifecycle methods on the base class.
Methods
protected override void WriteProperties(IJsonWriter writer) : System.Void
Overrides the base WriteProperties to include the image URI. Implementation calls base.WriteProperties(writer) and then writes a JSON property named "uri" with the current value of the uri property:- writer.PropertyName("uri");
- writer.Write(uri); This ensures the uri is included when the widget is serialized (for debugging UI state, persistence, or inspector tooling).
Usage Example
// Create and configure the debug image widget
var imageWidget = new Game.UI.Debug.Image();
imageWidget.uri = "file://assets/textures/debugIcon.png";
// When the UI system serializes the widget, WriteProperties will emit:
// "uri": "file://assets/textures/debugIcon.png"