Software Archive
Read-only legacy content
17061 Discussions

Multiple Activation Action scripts not being triggered

Rishabh_R_
Beginner
527 Views

Hey,

I'm using Unity Pro and have integrated the RealSense Toolkit into Unity. I'm trying to use the Activation action provided by the toolkit within Unity.

But, I'm facing a strange issue. If I just use one Activation Action (Script) in my scene by attaching it to some object it works as expected and does the job as per the trigger defined, but on using multiple Activation Scripts only one of them (the first one in the hierarchy is being fired) ..

What could be the issue?

Thanks

0 Kudos
1 Reply
MartyG
Honored Contributor III
527 Views

There isn't an issue I'm afraid, that seems to be exactly how the Action scripts in the toolkit work - you can only use one script of the same name per object (though you can mix different types of Action script together in one object).  It's the same with the TrackingAction script I use heavily in my own app.  The limitation makes developing camera controls in Unity more complex than it should be and will hopefully be changed in the 2015 SDKs.

I tried to get around this by creating different copies of the same script with different names, but this didn't work.  Even if you knew enough about C# language to edit the script to change all the script name references (e.g 'TrackingAction' to 'TrackingAction2') - since C# insists on the script name being the same as the name references in the script - the Action scripts don't seem to be ordinary C# scripts and can't be easily duplicated - you don't get the Inspector panel settings appear, for example, if you take a copy of the Action script's code and paste it into a brand new C# script file.

You can use multiple Action scripts via objects childed together though, with one Action script in each object.  That's how I got around the problem.

 

 

0 Kudos
Reply