I want to disable the Question Prefab so that when it is clicked the Prefab behind it will be shown:
I am using Unity 5.3.5 and C#.
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
I created a new gameObject and added this script:
Why did you created a new gameObject when you wanted to disable the prefab clones?.
There's nothing wrong with the given code. You should put the script on your Prefab.
If it still doesn't work. You can use EventSystems to get the Game Object that is currently selected and deactivate it.
Check this link for how to use Event Systems.