Files
BABA_YAGA/Packages/app.rive.rive-unity/Runtime/Components/Public/RenderObjects/Procedural/ProceduralDrawing.cs
2026-05-19 17:39:03 +07:00

45 lines
1.1 KiB
C#

using UnityEngine;
namespace Rive.Components
{
/// <summary>
/// Represents a procedural drawing that can be rendered within a ProceduralRiveWidget. Implement this class to create custom procedural graphics.
/// </summary>
public abstract class ProceduralDrawing : MonoBehaviour, IProceduralDrawing
{
public abstract void Draw(IRenderer renderer, AABB frame, RenderContext renderContext);
public virtual bool Advance(float deltaTime)
{
return false;
}
public virtual bool HitTest(Vector2 point, Rect rect)
{
return false;
}
public virtual bool HandlePointerDown(Vector2 point, Rect rect)
{
return false;
}
public virtual bool HandlePointerUp(Vector2 point, Rect rect)
{
return false;
}
public virtual bool HandlePointerMove(Vector2 point, Rect rect)
{
return false;
}
public bool HandlePointerExit(Vector2 point, Rect rect)
{
return false;
}
}
}