1
私はC#で新しくなったので、このエラーの意味を理解できません。 playVideo' does not implement interface member
Vuforia.ITrackableEventHandler.OnTrackableStateChanged(Vuforia.TrackableBehaviour.Status、Vuforia.TrackableBehaviour.Status「) ここに私のコードです:`playVideo 'はインターフェイスメンバを実装していません
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
using Vuforia;
public class playVideo : MonoBehaviour, ITrackableEventHandler{
public VideoClip videoToPlay;
public GameObject cubeObject;
private VideoPlayer videoPlayer;
private VideoSource videoSource;
private AudioSource audioSource;
public void OnTrackableStateChanged (TrackableBehaviour.Status newStatus) {
Debug.Log (newStatus);
if (newStatus == TrackableBehaviour.Status.DETECTED||
newStatus == TrackableBehaviour.Status.TRACKED ||
newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
{
Debug.Log ("Status Changed");
videoPlayer = gameObject.AddComponent<VideoPlayer>();
audioSource = gameObject.AddComponent<AudioSource>();
videoPlayer.playOnAwake = false;
audioSource.playOnAwake = false;
videoPlayer.source = VideoSource.VideoClip;
videoPlayer.audioOutputMode = VideoAudioOutputMode.AudioSource;
videoPlayer.EnableAudioTrack (0, true);
videoPlayer.SetTargetAudioSource (0, audioSource);
videoPlayer.clip = videoToPlay;
videoPlayer.Prepare();
videoPlayer.Play();
audioSource.Play();
}
}
}