I am trying to link a device motion value to a 2D Text element, so that the rotation Y value will appear as text in my scene.
I've been trying to implement a solution described in another thread, with no luck. Apparently since v85 was released in March 2020 there have been some changes to how scripting works in Spark AR.
This is the code I used in my project:
const Patches = require('Patches');
const numberFormat = 'Time: {0}';
const number = Patches.getScalarValue('number');
Patches.setStringValue('value', number.format(numberFormat));
This is what my script looks like in the editor
If anyone knows why the script is not working, please help me out.