12345678910111213141516171819202122232425 |
- using System;
- namespace UnityEditor.U2D.Animation
- {
- internal class SwitchModeTool : BaseTool
- {
- protected override void OnActivate()
- {
- if (skinningCache.mode != SkinningMode.SpriteSheet)
- {
- skinningCache.mode = SkinningMode.SpriteSheet;
- skinningCache.events.skinningModeChanged.Invoke(SkinningMode.SpriteSheet);
- }
- }
- protected override void OnDeactivate()
- {
- if (skinningCache.mode != SkinningMode.Character)
- {
- skinningCache.mode = SkinningMode.Character;
- skinningCache.events.skinningModeChanged.Invoke(SkinningMode.Character);
- }
- }
- }
- }
|