Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[Free] SkiaSharp for unity with skottie

Discussion in 'Assets and Asset Store' started by qaisammari, Jul 3, 2023.

  1. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    SkiaSharp for Unity for free [GitHub]

    SkiaSharp for Unity is a plugin that brings the power and flexibility of SkiaSharp, a 2D graphics library, to the Unity game development environment. With SkiaSharp for Unity, you can create high-quality, cross-platform 2D graphics and user interfaces for your Unity projects. This package also includes the Skottie library for working with Lottie animations.

    SkiaSharp is a .NET binding to the Skia library, which is used by popular platforms such as Google Chrome, Android, and Flutter. By integrating SkiaSharp into Unity, you can leverage its extensive set of APIs for rendering vector graphics, text, and images.

    skottie inside unity gif (lottie files):
    https://s11.gifyu.com/images/SQOEX.gif

    - **HarfBuzz support:** The integration of HarfBuzz enhances text rendering in SkiaSharp, offering benefits such as native fonts, emoji rendering, and RTL language support. This makes SkiaSharp for Unity an excellent choice for projects that require advanced text rendering capabilities.


    https://github.com/ammariqais/SkiaForUnity/assets/62248657/ac1a8c35-bb24-4b64-ac3e-85a5b06ed276

    Features
    • High-performance graphics: SkiaSharp for Unity utilizes Skia's hardware-accelerated rendering capabilities to deliver fast and smooth graphics performance.

    • Cross-platform support: SkiaSharp supports multiple platforms, including Windows, macOS, iOS, Android, allowing you to create graphics that work seamlessly across different devices.

    • Extensive API: SkiaSharp provides a rich set of APIs for drawing paths, shapes, text, and images, enabling you to create visually stunning graphics and user interfaces.

    • Custom shaders: With SkiaSharp for Unity, you can write custom shaders using the Skia graphics API, allowing you to create unique visual effects and stylized graphics.

    • Lottie animations: The package includes the Skottie library, which enables you to import and play Lottie animations in your Unity projects.

    • Integration with Unity: SkiaSharp for Unity integrates seamlessly with the Unity Editor, providing a familiar development environment for working with Skia graphics and Lottie animations in your Unity projects.

    Platform supports:
    • android
    • ios
    • macOs
    • windows
    download:
    https://github.com/ammariqais/SkiaForUnity/
     
    Last edited: Oct 30, 2023
    mgear likes this.
  2. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    # SkiaForUnity - New Release (v1.0.0.Pre-2)

    We are excited to announce the release of SkiaForUnity v1.0.0.Pre-2! This new version brings several enhancements, bug fixes, and exciting features to enhance your experience with Skia and Unity. Whether you're a seasoned user or just starting with SkiaForUnity, we believe this release will provide you with an even more powerful and enjoyable development environment.

    ## Release Highlights

    1. **Rendering Skottie Animation on Edit Mode in Unity**: With this release, SkiaForUnity introduces the ability to render Skottie animations directly within the Unity Editor. This feature allows you to preview and fine-tune your animations without entering Play mode, streamlining your workflow and saving development time.

    2. **Introducing SkottiePlayer.cs**: SkiaForUnity now includes the new `SkottiePlayer.cs` class, which enables you to play animations with ease. This class provides functionalities such as animation playback, looping, autoplay, and playing animations with specific Lottie markers. It simplifies the integration of Skottie animations into your Unity projects and gives you greater control over the playback experience.

    3. **OnAnimationFinished Delegate**: To enhance your animation control, we have added the `OnAnimationFinished` delegate. This delegate is called when an animation reaches its end, allowing you to trigger specific actions or events based on the completion of the animation. It provides a seamless way to handle animation completion and take further actions in your application.

    ## Changelog

    ### New Features

    - **Rendering Skottie Animation on Edit Mode in Unity**: Preview and fine-tune Skottie animations within the Unity Editor.
    - **SkottiePlayer.cs**: Play animations, loop animations, autoplay, and play animations with specific Lottie markers using the `SkottiePlayer.cs` class.
    - **OnAnimationFinished Delegate**: Trigger actions or events when an animation reaches its end with the `OnAnimationFinished` delegate.

    ### Enhancements

    - Performance optimizations for smoother Skottie animation playback.
    - Improved compatibility with various Skottie animation files.
    - Enhanced error handling and reporting for better debugging.

    ### Bug Fixes

    - Resolved issues related to Skottie animation rendering and playback.
    - Fixed compatibility issues with specific Lottie marker configurations.
    - Addressed minor bugs reported by the community.


    ## Watch the SkiaForUnity v1.0.0.Pre-2 Release Videos:
    ## Editor Mode
    https://github-production-user-asse...0749-ccf71cd1-17ae-4442-b42f-4d3d067849f1.mp4

    ## Playing Animations

    https://github-production-user-asse...1067-cc7a5d56-48e7-4e28-8e18-b8e8ec776eab.mp4
     
  3. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    # SkiaForUnity - New Release (v1.0.0)

    What's Changed
    • [unity wnidows] fix issue multiple plugins with the same name for unity by @ammariqais in #9
    • [Skottie Player] add methods getDuration and getFps by @ammariqais in #10
    Full Changelog: 1.0.0.pre-3...1.0.0
     
  4. hdxpmc

    hdxpmc

    Joined:
    May 1, 2016
    Posts:
    50
  5. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,492
    Interesting!
    One thing that confuses me though: On the github, the Get Started section explicitly aims at iOS and isn't general. Does that imply anything for other platforms?
     
  6. hdxpmc

    hdxpmc

    Joined:
    May 1, 2016
    Posts:
    50
    Don't run on Mac M1 due to code signing
     
    Last edited: Aug 14, 2023
  7. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    what the error?
     
  8. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
  9. hdxpmc

    hdxpmc

    Joined:
    May 1, 2016
    Posts:
    50
    Thank you for skiasharp for unity
    After change security & policy (allow to run that bundle), and it work
     
  10. Pavelfree

    Pavelfree

    Joined:
    Jul 11, 2017
    Posts:
    1
    Does anyone have working examples how to proper use Skia?
    I can't set generated image to Unity Texture.
    More likely I'm doing something wrong but Unity keeps crashing when I try to access Handle property of SKPixmap of SKImage.
     
  11. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    can you post the code
     
  12. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10
    version 2.0.0 released :),

    Harfbuzz now supports for unity,

    Why Use HarfBuzz and Skia
    Advantages of HarfBuzz
    Complex Text Layout: HarfBuzz is a leading open-source text shaping engine capable of handling complex scripts and languages. It provides excellent support for shaping and rendering text in various writing systems.

    Multilingual Support: HarfBuzz supports a wide range of scripts and languages, making it an ideal choice for developers aiming to reach a global audience.

    Standard Compliance: HarfBuzz adheres to established international text layout standards, ensuring compatibility with various platforms and rendering engines.

    Benefits
    Improved Text Quality

    Integrating HarfBuzz and Skia into Unity will result in significantly improved text rendering quality, especially for complex scripts, languages, RTL (Right-to-Left) languages, and emojis. This is crucial for creating more engaging and accessible applications.

    Enhanced Multilingual Support

    With HarfBuzz, Unity will be able to support a broader range of languages and writing systems, including RTL languages, making it easier to develop.

    Cross-Platform Compatibility

    Skia's cross-platform compatibility ensures that Unity applications will look and perform consistently across various operating systems. tested on (ios,android,macOs,windows)

    video:
    https://github.com/ammariqais/SkiaForUnity/assets/62248657/ac1a8c35-bb24-4b64-ac3e-85a5b06ed276
     
  13. qaisammari

    qaisammari

    Joined:
    Apr 12, 2021
    Posts:
    10