playMaker

Author Topic: Vuforia Actions and Prefabs.[SOLVED]  (Read 3583 times)

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Vuforia Actions and Prefabs.[SOLVED]
« on: August 09, 2016, 07:17:38 AM »
HI guys hope somebody can help:

I have used the Vuforia Playmake Packed prior to this without issue on a few app but I am now trying to set it up a new App using the latest versions of both playmaker and unity. 5.3.1 and 1.8.1.

This issue I am having is that the Vuforia package downloaded from here https://hutonggames.fogbugz.com/default.asp?W1119 has none of the old functionality, Trackable proxy prefab or actions etc.  If you import the old set of actions etc you get this error:

Assets/PlayMaker Vuforia/Scripts/PlayMakerVuforiaProxy.cs(48,44): error CS0246: The type or namespace name `DataSetLoadBehaviour' could not be found. Are you missing a using directive or an assembly reference?

on all of the action scripts and on the proxy script. 

Is there a way that this can be fixed or am I doing something obvious wrong?

any advise would be gratefully received.

Thanks

Le_bonn :)
« Last Edit: September 26, 2016, 01:47:39 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #1 on: August 10, 2016, 02:18:07 AM »
Hi,

 What vuforia action are you looking to use from the old package?

Bye,

 Jean

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #2 on: August 10, 2016, 07:00:38 AM »
Hi Jean,

Thanks for the reply,

It is Primarily the Proxy I need, to detect image target lost, image target found as events and broadcast these.

Set persist extended tracking and Activate data set would also be useful to.

Cheers

Le_bonn

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #3 on: August 10, 2016, 07:22:30 AM »
Hi,

 The proxy exists in the latest package, together with the events. Maybe you need to first delete the PlayMaker Vuforia before importing the new version so that it's a clean import.

 Bye,

 Jean

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #4 on: August 30, 2016, 05:25:26 AM »
Hi Jean,

Sorry for the late reply, I have been on holiday,

I have tried starting again, with a new project and all the newest plugins, playmaker, vuforia, vuforia/playmaker package and the same problems persists. 

The Playmaker Vuforia Package imports but doesn't contain any actions or prefabs and if you try to import the old actions and prefabs you get loads of errors.

I have also tried to use the new built in action downloader but that doesnt work for me either. 

I can attach an exported package to demonstrate what I mean or send to you direct if you think this will help.

Thanks again for your assistance.

le_bonn





rudolfwm

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #5 on: August 31, 2016, 06:52:52 AM »
Hi le bonn,

I made my own tracker custom action, based on the old one:

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.

using UnityEngine;
using Vuforia;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Augmented Reality")]
[Tooltip("NOTE: Requires Qualcomm Augmented Reality SDK. Sends events based on the state of a Trackable object. Optionally control visibility of children to automatically show/hide objects.")]
public class ARTrackableEvents : FsmStateAction
{
[Tooltip("Game Object that has a TrackableBehaviour component. E.g., ImageTargetBehavior.")]
public FsmOwnerDefault gameObject;
[Tooltip("Event to send when the trackable is found.")]
public FsmEvent trackingFoundEvent;
[Tooltip("Event to send when the trackable is lost.")]
public FsmEvent trackingLostEvent;
[Tooltip("Automatically control visibility of children. Turns renderer on when trackable found, off when trackable lost.")]
public FsmBool controlVisibility;
        public DefaultTrackableEventHandler _Tracker;
        private GameObject go;
        public string NameStr = "<unknown>";
public override void Reset()
{
gameObject = null;
// controlVisibility = true;
           
        }
        public override void OnEnter()
        {
            RegisterWithTracker();
        }
        public override void OnExit()
        {
//            UnRegisterWithTracker();
        }
        public void UnRegisterWithTracker()
        {
            if (_Tracker != null)
            {
                Debug.Log("UNRegister this handler");
                _Tracker.UnRegisterHandler(this);
            }
        }
        // Reigster the trackable event handler
        public void RegisterWithTracker()
{
            if (go != null) return;
go = Fsm.GetOwnerDefaultTarget(gameObject);

if (go == null)
{
Finish();
return;
}
            NameStr = go.name;
            _Tracker = go.GetComponent<DefaultTrackableEventHandler>();
            if(_Tracker!=null)
            {
                Debug.Log("Register this handler");
                _Tracker.RegisterHandler(this);
            }
}

public void OnTrackingFound()
{
            Debug.Log("Tracking found !" + NameStr);
            Fsm.Event(trackingFoundEvent);

}

        public void OnTrackingLost()
{
            Debug.Log("Tracking lost !" +NameStr);
            Fsm.Event(trackingLostEvent);

}
}
}

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #6 on: September 04, 2016, 06:11:54 AM »
Hi Guys,

Many thanks for the help rudolfwm, It is appreciated, I have tried what you are suggesting, creating an new action using the code you kindly provided but get two errors that I am unable to get rid of.

I have tried many permeations including using unity 5.1.3 an alternative, with the new version of Vuforia, again if you import the old version of the playmaker vuforia package you get the error CS0246 'DataSetLoadBehavior' could not be found, and if you use the new package from the ecosystem then the actions and proxies are not included meaning that the package cannot be used.

I am sorry for being a pain with this, I use this combination of packages a lot and would be very grateful of any assistance, I don't have either the skill or understanding to go into the code and sort it out myself. 



Many thanks

le_bonn

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #7 on: September 04, 2016, 06:25:05 AM »
Just a quick one,

The old package works with vuforia 4 but none of the newer versions.


postjudice

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #8 on: September 11, 2016, 11:57:05 PM »
Any word on this issue?  Where is the proxy prefab?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #9 on: September 12, 2016, 03:43:14 AM »
Hi,

 Ok, I uploaded a new version on the Ecosystem.

 It brings back the prefab that you can drop in the scene to declare the missing global events.

Let me know how it goes,

 Bye,

 Jean


le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
    • View Profile
Re: Vuforia Actions and Prefabs.
« Reply #10 on: September 21, 2016, 03:30:24 AM »
Hi Jean,

Many thanks;

The proxy is now working with Vuforia 5 and 6 without errors.

Cheers

Le_bonn


calculmentor

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Vuforia Actions and Prefabs.[SOLVED]
« Reply #11 on: March 21, 2017, 02:21:18 AM »
I there,

I have some strange behavior here trying to use Vuforia actions..
the events are not sent most of the time...
sometime, event are send without the "PlayMaker Vuforia Proxy" in the scene!!
I can't find any logique to this problem...somebody have an idea or issuing the same problem ??
thx
n.
calcul mentor

  *designer*

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Vuforia Actions and Prefabs.[SOLVED]
« Reply #12 on: March 21, 2017, 10:50:39 PM »
Hi,

 do you get any errors in the unity Console?

Bye,

 Jean