Prefab Puzzle

https://hastebin.com/opoginoxaq.cs

Here’s my code. I’m trying to first get the input from an input field and then delete the gui which was instantiated in another script as a prefab.

The problem is, nothing in my input “return” part of the script appears to be executing. Someone in irc told me to use the Input Field’s OnEndEdit event instead of waiting for enter to be pressed. I guess I could do that but this seems simpler.

One of my questions is, how do I get at the input field inside the prefab? I can’t drag that from the prefab to the slot in the game object where i attached my script, so I have to do that in code, which someone said is possible, but I don’t know how to do it. I can drag the transform to inputbox1, no problem, just can’t get at the input field to drag it to inputbox. As I said, though, nothing in this script appears to be executing correctly. So I’m asking if anyone has a fix for it?

https://hastebin.com/canipaweyu.cs

Figured it out with the help of the irc channel. To get around the problem of not being able to get at the input field, I just put that prefab back in the hierarchy. Not an ideal solution, as I wanted to do it the proper way in code, but it works for my situation.