using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Vuforia
{
public class VirtualButtonTest : MonoBehaviour, IVirtualButtonEventHandler
{
public VirtualButtonBehaviour[] vbs;
public GameObject cube;
public GameObject sphere;
void Start()
{
}
void OnEnable()
{
for (int i = 0; i < vbs.Length; ++i)
{
//在虚拟按钮中注册TrackableBehaviour事件
vbs[i].RegisterEventHandler(this);
}
}
void OnDisable()
{
for (int i = 0; i < vbs.Length; ++i)
{
//在虚拟按钮中删除TrackableBehaviour事件
vbs[i].UnregisterEventHandler(this);
}
}
void Update()
{
}
public void OnButtonPressed(VirtualButtonBehaviour vb)
{
switch (vb.VirtualBu
Vuforia虚拟按钮
最新推荐文章于 2024-04-26 19:12:12 发布