First, I created an event bus (EBus) interface with two functions in C++, implemented that EBus interface and its two functions using “Reflect” and “behaviorContext” in another class, updated my “waf_files”, and built my application.
Next, in the editor, I have a UI Canvas button that uses a LUA script to call one of my EBus functions using “MyEventBus.Broadcast.CreateCanvas()” when the button is clicked. I am following the “LyShineExamples” project in the Gems folder since it programmatically modifies the UI.
When I click the UI Canvas button, I get the error: “attempt to index global ‘MyEventBus’ (a nil value)’”.
Why does UI Canvas not recognize the “MyEventBus” EBus?
Any ideas on how I can troubleshoot this problem?