Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

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

ISpriteEditor

interface in UnityEditor.Experimental.U2D

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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.

Properties

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 Methods

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.
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.

Did you find this page useful? Please give it a rating: