Experimental: this API is experimental and might be changed or removed in the future.

ISpriteEditor

interface in UnityEditor.Experimental.U2D

매뉴얼로 전환

설명

Interface that defines the functionality available for classes that inherits SpriteEditorModuleBase.

Used by Sprite Editor Window to encapsulate functionality accessible for Sprite Editor modules when editing Sprite data.

변수

editingDisabledIndicates that if Sprite data editing should be disabled; for example when the Editor is in Play Mode.
enableMouseMoveEventIndicates if ISpriteEditor should be interested in mouse move events.
selectedSpriteRectThe current selected Sprite rect data.
spriteRectsSets current available Sprite rects.
windowDimensionProperty that defines the window's current screen position and size.

Public 함수

ApplyOrRevertModificationThe method will inform current active SpriteEditorModuleBase to apply or revert any data changes.
GetDataProviderGets data provider that is supported by the current selected Assets's importer.
GetMainVisualContainerReturns a VisualElement for attaching child VisualElement onto the main view of a ISpriteEditor.
HandleSpriteSelectionThe method updates ISpriteEditor.selectedSpriteRect based on current mouse down event and ISpriteEditor.spriteRects available.
RequestRepaintRequest to repaint the current view.
SetDataModifiedIndicates that there has been a change of data. In Sprite Editor Window, this enables the 'Apply' and 'Revert' button.
SetPreviewTextureSets a custom texture to be used by the ISpriteEditor during setup of the editing space.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961