Back to API Reference
Class

MediaWrapper

abstract

Manages one inline-flowed RectTransform and its presentation.

Derived Types(2)

Types that inherit from MediaWrapper.

public void Setup()
protected virtual void InitializeInstance()

Registers a newly created instance for editor cleanup.

protected virtual void PositionInstance()

Applies placement and presentation in the render root's local space.

public void Destroy()
protected virtual void ReleaseInstance()

Releases the instance according to its ownership.

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 UniTextBase owner
public Vector2 anchoredPosition
public Vector2 sizeDelta
public Vector2 pivot
public float rotation
public bool isDirty
public bool needDestroy
protected bool created