GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing ammariqais.github.io — SkiaForUnity: SkiaForUnity
Loading...
Searching...
No Matches
SkiaForUnity Getting StartedTo get started with SkiaSharp for Unity, follow these steps: Package Manager
https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp iOS Setup If building for iOS, add __UNIFIED__ and __IOS__ to your Scripting Define Symbols:
ComponentsHB TextBlockHB_TEXTBlock is the core text rendering component powered by HarfBuzz. It supports:
Adding to SceneUse the menu: GameObject > Skia UI (Canvas) > HB TextBlock This automatically creates a Canvas and EventSystem if needed. Key Properties
Rich Text ExamplehbText.SetRichText("Hello <b>Bold</b> <i>Italic</i> <color=#FF0000>Red</color> <size=30>Big</size>");
HB InputFieldHBInputField is a full-featured input field component similar to TMP_InputField, built on HB_TEXTBlock. It supports both desktop and mobile platforms. Adding to SceneUse the menu: GameObject > Skia UI (Canvas) > HB InputField This creates a complete hierarchy:
Features
Code Exampleusing SkiaSharp.Unity.HB;
public class MyUI : MonoBehaviour {
[SerializeField] HBInputField inputField;
void Start() {
inputField.onValueChanged.AddListener(OnTextChanged);
inputField.onSubmit.AddListener(OnSubmit);
}
void OnTextChanged(string value) {
Debug.Log("Text: " + value);
}
void OnSubmit(string value) {
Debug.Log("Submitted: " + value);
}
}
Definition HB_TEXTBlock.cs:11 HB Text AnimatorHBTextAnimator adds sequential animation steps to any HB_TEXTBlock. Each step can combine multiple effects. Available Effects
Multi-Step AnimationsEach step has its own duration, delay, and ease curve. Steps play sequentially. Enable Loop to repeat the full sequence. using SkiaSharp.Unity.HB;
public class AnimExample : MonoBehaviour {
[SerializeField] HBTextAnimator animator;
void Start() {
animator.onComplete.AddListener(() => Debug.Log("All steps done"));
animator.onStepComplete.AddListener(i => Debug.Log("Step " + i + " done"));
animator.Play();
}
}
Skottie PlayerSkottiePlayer plays Lottie/Bodymovin JSON animations using the Skia Skottie library. Setup
Code Exampleusing SkiaSharp.Unity;
public class LottieExample : MonoBehaviour {
[SerializeField] SkottiePlayer skottiePlayer;
void Start() {
skottiePlayer.SetState("MyState");
skottiePlayer.PlayAnimation();
skottiePlayer.OnAnimationFinished += OnFinished;
}
void OnFinished(string stateName) {
Debug.Log("Animation finished: " + stateName);
}
}
Provides functionality to play and control Lottie animations in Unity. Definition SkottiePlayer.cs:30 void PlayAnimation(bool? reset=null) Initiates playback of the loaded animation. Definition SkottiePlayer.cs:176 void SetState(string name) Sets the current state of the Lottie animation. Definition SkottiePlayer.cs:126 Definition HB_TEXTBlock.cs:11 SVG LoaderSkiaForUnity supports rendering SVG graphics using SVG.Skia.
Platform Support
Requirements
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |