Button UI not working in Build

On the preview, the buttons works perfectly

But on build, the buttons respond to my click but no event is being called.
Here are the components of the button

I already did the fixes posted here:
Link

But none worked.
This is the first time happened to me so I don’t know what else to do.
Some button works fine.
The canvas they are in is in the topmost layer.

Apparently, it’s because of these first 2 lines(commented out). Must be the directory of the text file being changed when built. I just added the list of words as a string to make it work.

Your Assets folder doesn’t exist in a build, so using hard coded paths like that isn’t going to work.

If you want to reference a text file in your project files, it will be an TextAsset: Unity - Scripting API: TextAsset

You can just reference it via the inspector that way.