Vision scripting API
Reference for ConvaiVisionPublisher and the frame source interfaces, including properties, methods, domain events, and state monitoring patterns.
ConvaiVisionPublisher
Property
Type
Description
Method
Description
using Convai.Modules.Vision;
using Convai.Runtime.Vision.Publishing;
using UnityEngine;
public class VisionController : MonoBehaviour
{
[SerializeField] private ConvaiVisionPublisher _publisher;
void Start()
{
// Switch to high-responsiveness for this scene
_publisher.SetPublishPolicy(VisionPublishPolicy.HighResponsiveness);
}
void Update()
{
if (Input.GetKeyDown(KeyCode.V))
{
bool isPublishing = _publisher.IsPublishing;
Debug.Log($"Track '{_publisher.VideoTrackName}' publishing: {isPublishing}");
}
}
}IVisionFrameSource
Member
Kind
Description
IVisionFrameSourceStatusProvider
Member
Kind
Description
Monitor state changes
VisionSourceState reference
State
Meaning
Domain events
Property
Type
Description
Property
Type
Description
Property
Type
Description
Property
Type
Description
Property
Type
Description
Next steps
Custom frame sourcesTroubleshoot visionLast updated
Was this helpful?