I have an old SparkAR effect, where I use one script. This script is exactly the same as in the standard "neck decoration" template, but for some reason, only in my old effect I see the following warning message:
Warning: Possible Unhandled Promise Rejection: Trying to set signal from Script with name (neck). Please make sure to define a FromScript patch with that name in the patch editor
My script:
const Scene = require('Scene');
const Patches = require('Patches');
const Reactive = require('Reactive');
const FaceTracking = require('FaceTracking');
const face0 = FaceTracking.face(0);
Promise.all([
Scene.root.findFirst('bustA'),
Scene.root.findFirst('bustB'),
Scene.root.findFirst('bustC'),
]).then(onReady);
function onReady(assets) {
const bustA = assets[0];
const bustB = assets[1];
const bustC = assets[2];
const bustAtra = bustA.transform.toSignal();
const bustBtra = bustB.transform.toSignal();
const bustCtra = bustC.transform.toSignal();
const faceTra = face0.cameraTransform.applyTo(bustAtra).applyTo(bustBtra).applyTo(bustCtra);
const FaceOffset = Reactive.point(0,0,0.535);
const neckPos = faceTra.position.add(FaceOffset).expSmooth(70);
Patches.inputs.setVector('neck', neckPos);
}
Why I see this error only in my old effect while the scripts are identical? And how can I fix it?