Advertisement

why do I keep getting errors?

Started by July 29, 2021 12:17 AM
17 comments, last by fleabay 3Β years, 3Β 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

}

}

Learn some basic C# before you start with Unity.

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

Advertisement

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

Advertisement

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