Back to API Reference
Class

MediaWrapper

abstract

Owns a single inline-flowed RectTransform created by InlineMediaModifier<TEntry, TWrapper>. Subclasses decide how the instance is created (prefab clone vs fresh GameObject) and how per-frame visual state is applied (sprite/color, prefab-internal rebuild).

public void Setup()
public void Destroy()
protected abstract bool TryCreate()

Creates the underlying instance RectTransform (and any sibling components). Return to abort creation — e.g. the renderable payload is missing.

protected abstract void ApplyContent()

Applies per-frame visual state (sprite, tint, etc.) to instance and its children. Called after the transform has been positioned and sized. No-op for wrappers whose payload is fully owned by an instantiated prefab.

protected virtual void OnDestroyed()

Optional hook called after Destroy tears down the instance, for subclass state reset.

public RectTransform instance
public Transform parent
public Vector2 anchoredPosition
public Vector2 sizeDelta
public Vector2 pivot
public bool isDirty
public bool needDestroy
protected bool created