Version: 2021.3

SpriteRenderer.RegisterSpriteChangeCallback

切换到手册
public void RegisterSpriteChangeCallback (UnityAction<SpriteRenderer> callback);

参数

callback The callback to invoke when the SpriteRenderer's Sprite reference changes.

描述

Registers a callback to receive a notification when the SpriteRenderer's Sprite reference changes.