A small error is happening to me that I think is a bug, I will explain what happens to me.
In the create character scene, you just select a Trainer, Adan or Eva.
That calls this function to create the Trainer entity

The GameCreate_CreateTemplate function is this:

that function stores the Trainer entity here:
pc.app.root.findByName(“Root”).findByName(“CrearScene”).playerSelected
Here comes my problem, this entity has an active script called pGlobal.js
and that script is active in the game when you create it
within that script I have created an on method to receive a call “test” that will execute a console.log to verify that it receives the call

when executing that call in the console, the script inside the entity does not receive it
And when I run it directly from the script it works
could you help me with that please? I spent hours thinking and I can’t think what could have happened.
This is my scene in case you want to take a look:
https://playcanvas.com/editor/scene/1389734