[ASK] Help Broooo Unity3D & Viforia
2 posters
Page 1 of 1
[ASK] Help Broooo Unity3D & Viforia
Malam Bro,
saya stephen, sedang mejalankan tugas akhir kampus dimana saya mengambil judul AR.
saya sedang membuat virtual button dari vuforianya tidak ada virtual botton, saya create new C# dan memasukan
codenya sebagai berikut :
terdapat error:
Assets/VirtualButtonEventHandler.cs(9,56): error CS0246: The type or namespace name `IVirtualButtonEventHandler' could not be found. Are you missing a using directive or an assembly reference?
bagaimana cara mengatasinya ya bro?
Helpp Me
Thanks Brooo
saya stephen, sedang mejalankan tugas akhir kampus dimana saya mengambil judul AR.
saya sedang membuat virtual button dari vuforianya tidak ada virtual botton, saya create new C# dan memasukan
codenya sebagai berikut :
- Code:
using UnityEngine;
using System.Collections.Generic;
/// <summary>
/// This class implements the IVirtualButtonEventHandler interface and
/// contains the logic to swap materials for the teapot model depending on what
/// virtual button has been pressed.
/// </summary>
public class VirtualButtonEventHandler : MonoBehaviour,
IVirtualButtonEventHandler
{
#region PUBLIC_MEMBER_VARIABLES
/// <summary>
/// The materials that will be set for the teapot model
/// </summary>
public Material[] m_TeapotMaterials;
public AudioSource sentuhkiri;
public AudioSource sentuhkanan;
#endregion // PUBLIC_MEMBER_VARIABLES
#region PRIVATE_MEMBER_VARIABLES
private GameObject mTeapot;
private List<Material> mActiveMaterials;
#endregion // PRIVATE_MEMBER_VARIABLES
#region UNITY_MONOBEHAVIOUR_METHODS
void Start()
{
// Register with the virtual buttons TrackableBehaviour
VirtualButtonBehaviour[] vbs = GetComponentsInChildren<VirtualButtonBehaviour>();
for (int i = 0; i < vbs.Length; ++i)
{
vbs[i].RegisterEventHandler(this);
}
// Get handle to the teapot object
mTeapot = transform.FindChild("teapot").gameObject;
// The list of active materials
mActiveMaterials = new List<Material>();
}
#endregion // UNITY_MONOBEHAVIOUR_METHODS
#region PUBLIC_METHODS
/// <summary>
/// Called when the virtual button has just been pressed:
/// </summary>
public void OnButtonPressed(VirtualButtonAbstractBehaviour vb)
{
Debug.Log("OnButtonPressed");
// Add the material corresponding to this virtual button
// to the active material list:
switch (vb.VirtualButtonName)
{
case "Name":
sentuhkiri.Play();
break;
case "Real":
sentuhkanan.Play();
break;
}
}
/// <summary>
/// Called when the virtual button has just been released:
/// </summary>
public void OnButtonReleased(VirtualButtonAbstractBehaviour vb)
{
// Remove the material corresponding to this virtual button
// from the active material list:
switch (vb.VirtualButtonName)
{
case "Name":
sentuhkiri.Stop();
break;
case "Real":
sentuhkanan.Stop();
break;
}
// Apply the next active material, or apply the default material:
}
#endregion // PUBLIC_METHODS
}
terdapat error:
Assets/VirtualButtonEventHandler.cs(9,56): error CS0246: The type or namespace name `IVirtualButtonEventHandler' could not be found. Are you missing a using directive or an assembly reference?
bagaimana cara mengatasinya ya bro?
Helpp Me
Thanks Brooo
loveblue91- Unity3D Newbie
- Posts : 1
Points : 3
Reputation : 0
Join date : 2015-06-02
Re: [ASK] Help Broooo Unity3D & Viforia
kliatannya ada fungsi yang dipanggil tapi tidak sesuai namanya
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Thu Mar 23, 2017 10:21 am by kamil
» [ASK HELP] Slide informasi di augmented reality
Tue Jan 03, 2017 8:58 pm by Briyan_ap
» ASK cara klik dan memunculkan informasi
Tue Jan 03, 2017 8:54 pm by Briyan_ap
» [Ask] mengubah game PC menjadi game Android
Tue Jan 03, 2017 10:57 am by NiethaChan
» Virtualisasi suatu Gedung mengunakan unity3D + google seketchUP
Sat Dec 31, 2016 1:06 am by zeepank
» Minta Tolong, slideshow ngga muncul saat object di klik
Tue Dec 27, 2016 12:53 pm by Briyan_ap
» tolong dong lagi bikin button rotate tp button ga keluar
Wed Dec 21, 2016 1:15 pm by Lita Misae
» algoritma Minimax/negascout buat checkers
Wed Nov 30, 2016 1:51 am by ardiansa
» screenshot
Wed Nov 16, 2016 10:15 pm by azhari