As you can see the picture below, I already attached a "DeleteQuizDetailRow" script onto a button (On CLick() event), but there is no public function in the script
public class DeleteQuizDetailRow : MonoBehaviour
{
public void test()
{
Debug.Log("test");
}
}
CodePudding user response:
You need to attach the script in the gameobject, then drag and drop the gameobject to the slot, do not drag and drop the script directly from your files to the slot
CodePudding user response:
I can help you with that it's easy to do. you dragged the script from your project view to the inspector view streat to the button . Instead do this
- create an empty GameObject in your Hierarchy call it something like > ButtonsManager
- Drag and drop your script DeleteQuizDetailRow inside the empty gameObject
- Now Select this new ButtonsManager gameObject and drag , drop it in the runtime button slot this should work fine I'll link some useful videos for you my friend Unity tutorial playlist