我在這裏如何註冊Unity3D中的事件ARToolKit 6 for OnMarkerFound?
https://github.com/artoolkit/ar6unity-wiki/wiki/Setting-Up-Your-First-ARToolKit-for-Unity-Scene
我需要使其觸發OnMarkerFound從標記事件註冊下面這個教程。下面的文章是過時
的OnMarkerFound event not getting called - Unity3D ARToolKit
https://archive.artoolkit.org/documentation/doku.php?id=6_Unity:unity_scripts
我讀AAREventReceiver.cs文件,它說的東西很模糊:
using UnityEngine;
/// <summary>
/// Any object that implements IAREventReceiver is eligable to register for tracking
/// events from any ARTrackable object.
/// To register with an ARTrackable:
/// arTrackedMarker.eventReceivers.add(this);
/// </summary>
///
public abstract class AAREventReceiver : MonoBehaviour {
public abstract void OnMarkerFound(ARTrackable marker);
public abstract void OnMarkerTracked(ARTrackable marker);
public abstract void OnMarkerLost(ARTrackable marker);
}
例如,我找不到任何地方IAREventReceiver
。另外我在哪裏可以放arTrackedMarker.eventReceivers.add(this);
?
然後我看着我的AR Trackable對象註冊事件接收器。資產列表顯示none
,儘管我有很多可用於註冊事件的GameObjects。
坦率地說,我不知道如何在V6這裏註冊事件。即使這個文檔是不準確的
https://archive.artoolkit.org/documentation/doku.php?id=6_Unity:unity_scripts
能否請你指出我嗎?謝謝。