Including both SkeletonAnimation and SkeletonGraphic examples in your Unity Asset Store package can be beneficial, as it provides flexibility for different use cases. Here are some considerations based on the provided contexts:
SkeletonAnimation is typically used for animations that are part of the 3D scene, rendered by the MeshRenderer. It is suitable for most game objects that are not part of the UI.
SkeletonGraphic is designed for UI elements and is rendered by the CanvasRenderer. It is ideal for animations that need to be part of the Unity UI system, such as reward animations shown in a UI overlay.
Performance: Both components have similar performance characteristics, but SkeletonGraphic might have a slight overhead when used extensively in a UI context. However, for a short reward animation, this difference is likely negligible.
Compatibility: Including both examples ensures that users can integrate your animation into their projects regardless of whether they are using Unity's UI system or not.
Ease of Use: Providing both examples can make your asset more user-friendly, as users can choose the component that best fits their needs without having to convert or adapt the animation themselves.
In summary, including both SkeletonAnimation and SkeletonGraphic examples will make your asset more versatile and user-friendly, catering to a wider range of potential users and use cases.