Function name dosen't show up even if there is code for it

When i try to select the function like in the image below, it dosen’t show up even if there is code:

1 Like

the version is 2022.3.44f1

1 Like

Are you linking from the Project View accidentally?

Just Tested it. It works that way, as you described. You must reference not from Project View. You must reference from the Objects on Scene Tab, not from the Assets Tab when selecting the object.

I show you here the 2 ways to reference correctly in your case:

1 Like

Just to add a bit more detail, you need to specify a GameObject in the scene which has the PlayGame script as a component. You don’t drag in the PlayGame script directly.

It is a bit hard to tell from your screenshot, but it looks like you have attached the PlayGame script directly to this Play button. So you would actually drag the Play button from the hierarchy into the box under “Runtime Only”, then you should be able to select from all of the available public functions of the Play button object.

This is a super SUPER annoying problem… so easy to do, I wish Unity would fix it.

I can see from your screenshot that you’ve been bitten by this problem: