Hi,
It’s great to see that you are exploring Unity yourself. This will help you gain a deeper understanding of this game engine. ![]()
Regarding your questions, it is possible to assign a prefab or a game object to the OnClick field as Unity creates objects automatically. For instance, there will be a SceneLoader object. If you just assign the SceneLoader script, Unity will not create an object. For this reason, you cannot access a method inside the “script”.
In this case, you may assign a prefab to the OnClick field because the LoadNextScene method does not depend on anything in the scene.
Do you mean you accidentally deleted a file in your Assets folder? If so, check the Windows recycle bin. Usually, the deleted file can be found and retrieved there.
Regarding the “Additional” part, it looks as if you know what you are doing. For this reason, I would suggest to simply test what you did. In many cases, there are multiple ways to make something work in Unity. If your approach works, it’s a solution by definition. ![]()
I hope this helped.
See also:
- Forum User Guides : How to mark a topic as solved