Indonesia Unity3D Game Developing
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Game Mewarnai Tutorial
[ASK] Help Broooo Unity3D & Viforia EmptyThu Mar 23, 2017 10:21 am by kamil

» [ASK HELP] Slide informasi di augmented reality
[ASK] Help Broooo Unity3D & Viforia EmptyTue Jan 03, 2017 8:58 pm by Briyan_ap

» ASK cara klik dan memunculkan informasi
[ASK] Help Broooo Unity3D & Viforia EmptyTue Jan 03, 2017 8:54 pm by Briyan_ap

» [Ask] mengubah game PC menjadi game Android
[ASK] Help Broooo Unity3D & Viforia EmptyTue Jan 03, 2017 10:57 am by NiethaChan

» Virtualisasi suatu Gedung mengunakan unity3D + google seketchUP
[ASK] Help Broooo Unity3D & Viforia EmptySat Dec 31, 2016 1:06 am by zeepank

» Minta Tolong, slideshow ngga muncul saat object di klik
[ASK] Help Broooo Unity3D & Viforia EmptyTue Dec 27, 2016 12:53 pm by Briyan_ap

» tolong dong lagi bikin button rotate tp button ga keluar
[ASK] Help Broooo Unity3D & Viforia EmptyWed Dec 21, 2016 1:15 pm by Lita Misae

» algoritma Minimax/negascout buat checkers
[ASK] Help Broooo Unity3D & Viforia EmptyWed Nov 30, 2016 1:51 am by ardiansa

» screenshot
[ASK] Help Broooo Unity3D & Viforia EmptyWed Nov 16, 2016 10:15 pm by azhari

Statistic

[ASK] Help Broooo Unity3D & Viforia

2 posters

Go down

[ASK] Help Broooo Unity3D & Viforia Empty [ASK] Help Broooo Unity3D & Viforia

Post  loveblue91 Tue Jun 02, 2015 9:52 pm

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 :

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? Sad Sad Sad Sad Sad
Helpp Me

Thanks Brooo
loveblue91
loveblue91
Unity3D Newbie
Unity3D Newbie

Posts : 1
Points : 3
Reputation : 0
Join date : 2015-06-02

Back to top Go down

[ASK] Help Broooo Unity3D & Viforia Empty Re: [ASK] Help Broooo Unity3D & Viforia

Post  aanimation Fri Jun 26, 2015 1:36 pm

kliatannya ada fungsi yang dipanggil tapi tidak sesuai namanya
aanimation
aanimation
Unity3D Newbie
Unity3D Newbie

Posts : 47
Points : 50
Reputation : 3
Join date : 2014-03-21
Age : 38
Location : Jogjakarta

https://dl.dropboxusercontent.com/u/25548837/majaGame/version5.h

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum