(SOLVED) Behavior on Global Object in External Layout not triggering. Bug?

I have a custom extension with a behavior on it that attaches to a button object and has an action to change the scene. I have attached the behavior to a global object and that global object is added to an external layout which is added to each scene.

This is a close button ([X] in upper right of screen). I added it to an external layout so that I could add it to all the game levels (scenes) for reusability. The button shows on the screen on each level. The button animations on hover and click work. However, the On Button Click never seems to fire. I have also added a console log message to the actions and I never see it.

Is this a bug?

Or, should I be able to add a function to behavior that is attached to a global object on an external layout which is added to a scene and have it work?

When you add an action, it doesn’t run automatically. It creates the action but it needs to be triggered by an event. If you add a doStepPreEvents instead of a function, it will check for the click event. Although, I’m unsure if this is the most efficient way of doing it.

I tested it here by playing a sound.

That worked. Thanks!

If anyone knows a better way please let us know.