πŸŽ‰ Celebrating 25 Years of GameDev.net! πŸŽ‰

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

why do I keep getting errors?

Started by
17 comments, last by fleabay 2Β years, 11Β months ago

ok so I've been following this tutorial for a main menu but I'm having trouble with the code because it keeps saying I have errors when I cant find any so all help is appreciated

using UnityEngine;

using UnityEngine.SceneManagement;

using System.Collections;

public class Restart : MonoBehaviour

{

public void RestartGame()

{

SceneManager.LoadScene(SceneManager.GetActiveScene().name); // loads current scene

}

}

Advertisement

Learn some basic C# before you start with Unity.

πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚<←The tone posse, ready for action.

yeah im taking a course but im only on the basics and cant figure the problem out for this piece

An opening brace has to have a closing brace and they need to be correctly matched.

Actually, this might not be the problem, the code is strangely formatted. Use code tags and post the actual errors you get. Always post the error.

πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚<←The tone posse, ready for action.

ok its not letting me post the screenshot let me add it to a google doc

https://docs.google.com/presentation/d/1JVtBU4wyEPnYMSOFk6gyvneOM9JVKScQLyPQkHSYNq4/edit#slide=id.p

Need to request access for that so I won't bother.

Instead of posting a screenshot can you not copy/paste the error text?

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

unity wont let me copy the errors so try this new link maybe

https://docs.google.com/presentation/d/1JVtBU4wyEPnYMSOFk6gyvneOM9JVKScQLyPQkHSYNq4/edit?usp=sharing​

the share settings should allow anyone with that link to view it

This topic is closed to new replies.

Advertisement