How do you subscribe a pulse value from the patches in Spark AR in versions after v101?

906 Views Asked by At

I want to know how this code can be done in the new scripting in spark ar. I want to know how you can subscribe to a pulse value from the patches. you used to be able to do it like this:

Patches.getPulseValue('pulse1').subscribe(() => {

});

how can this be done in versions of spark ar after version 101?

1

There are 1 best solutions below

0
On BEST ANSWER

After a morning of digging I found out it can be done like this:

Patches.outputs.getPulse('pulse1').then(value => value.subscribe(() => {
 
}));

I hope this helps other people who have run into this problem as well.