Log in or register to post comments

where the script IVirtualButtonEventHandler in sdk 2.8.7 ?

April 17, 2014 - 11:03am #1

hi ...

 

i see code from my friends and he use IVirtualButtonEventHandler in script qualcom. and the contains code

/*==============================================================================
Copyright (c) 2010-2013 QUALCOMM Austria Research Center GmbH.
All Rights Reserved.
Confidential and Proprietary - QUALCOMM Austria Research Center GmbH.
==============================================================================*/

/// <summary>
/// An interface for handling virtual button state changes.
/// </summary>
public interface IVirtualButtonEventHandler
{
    /// <summary>
    /// Called when the virtual button has just been pressed.
    /// </summary>
    void OnButtonPressed(VirtualButtonBehaviour vb);

    /// <summary>
    /// Called when the virtual button has just been released.
    /// </summary>
    void OnButtonReleased(VirtualButtonBehaviour vb);
}

i need the function onButtonReleased. when im copy that's script have error like this ..

Assets/Script/VirtualButtonEventHandler.cs(3,14): error CS0535: `VirtualButtonEventHandler' does not implement interface member `IVirtualButtonEventHandler.OnButtonPressed(VirtualButtonAbstractBehaviour)'

the name script from my friends VirtualButtonEventHandler .

 

anyone help ?

where the script IVirtualButtonEventHandler in sdk 2.8.7 ?

March 14, 2018 - 12:30pm #5

Just replace the VirtualButtonBehaviour

with

VirtualButtonAbstractBehaviour

where the script IVirtualButtonEventHandler in sdk 2.8.7 ?

April 22, 2014 - 3:18am #4

You should use the IVirtualButtonEventHandler interface, i.e.:

using UnityEngine;
using System.Collections.Generic;
 
public class VirtualButtonEventHandler : MonoBehaviour, IVirtualButtonEventHandler
{
 
public void OnButtonPressed(VirtualButtonAbstractBehaviour vb)
    {
//code here
}
 
public void OnButtonReleased(VirtualButtonAbstractBehaviour vb)
       {
        return;
    }
}

 

where the script IVirtualButtonEventHandler in sdk 2.8.7 ?

April 18, 2014 - 9:41am #3

when im replace the code i have error like this ...

 

Assets/Script/VirtualButtonEventHandler.cs(4,57): error CS1721: `VirtualButtonEventHandler': Classes cannot have multiple base classes (`UnityEngine.MonoBehaviour' and `VirtualButtonBehaviour')

 

and this the code

 

using UnityEngine;
using System.Collections.Generic;

public class VirtualButtonEventHandler : MonoBehaviour, VirtualButtonBehaviour
{

public void OnButtonPressed(VirtualButtonAbstractBehaviour vb)
    {
//code here
}

public void OnButtonReleased(VirtualButtonAbstractBehaviour vb)
       {
		return;
	}
}

 

any suggest to fix ? >.<

where the script IVirtualButtonEventHandler in sdk 2.8.7 ?

April 18, 2014 - 3:22am #2

Just replace the VirtualButtonBehaviour

with

VirtualButtonAbstractBehaviour

in the OnButtonPressed() and OnButtonReleased()

This was a small API change introduced in Vuforia 2.8.7 with respect to previous versions.

 

Log in or register to post comments