Singularity/Library/PackageCache/com.unity.2d.animation@7.0.10/Editor/SkinningModule/CharacterModeTool/SwitchModeTool.cs
2024-05-06 11:45:45 -07:00

26 lines
731 B
C#

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);
}
}
}
}