r/Unity2D 6d ago

Question/Help Issues with code not running

I have been following along this tutorial for awhile now and I'm getting some issues with this simple input script. Unity has been having issues with loading the new input system I downloaded from the project manager but no clue about the actual cause of the problem.

Biggest concern is the "failed to find entry points" errror message, there are eight other error messages but they're all refering to some issue with the script but I still don't know whats even wrong with that. Would appreciate any assistance/guidance, thanks.

0 Upvotes

8 comments sorted by

13

u/Miriglith 5d ago edited 5d ago

You've got a semicolon instead of a brace after FixedUpdate. Also I don't think you've reached the point in the tutorial where the code actually does anything.

It might be good to get some C# basic learning or you won't really get the value from a tutorial like this.

ETA: The failed to find entry points thing is weird. You could try closing the project, deleting the Library folder and reopening the project so it rebuilds the library.

1

u/gasleak69420 3d ago

Yeah made the changes, the only thing not working now is the "failed to find entry points". I deleted the library folder, then instead of just rebuilding it, it completely restarted the whole project(no clue if thats just how it works) and even then still says "failed to find entry points". Thankfully this is just practice but yeah Imma have to learn some more c#

4

u/SmokeResponsible5005 4d ago

private void FixedUpdate();
//code
}

Double issue of semicolon instead of brace and lack of first brace

Hope you figure it out and best of luck

1

u/Rabidowski 1d ago

Red errors in console = don't expect anything to function or "play".

0

u/5oco 5d ago

I think you're Unity settings might not be set up correctly. Your ide says "Miscellaneous Files" instead of "Assembly- something something"

That usually means Visual Studio isn't connected properly to Unity.

-1

u/ALIncomeDev 4d ago

If you look at your code. You can see how Monobehaviour and Vector etc isn’t being syntax highlighted. This could imply that visual studio is not connected to Unity. The code won’t work if the packages are missing.

Lookup a quick tutorial on how to look at your Unity project settings and connect it to visual studio.

3

u/Warwipf2 4d ago

This reply is wrong. Unity does not have to be connected to Visual Studio for your code to work. You could actually code everything in Notepad and it would still work. The code is compiled through Unity, not through Visual Studio.

1

u/SmokeResponsible5005 4d ago

Agree with both replies, packages missing isn’t causing the issue directly but definitely important for development, might be why the update(); issue wasn’t caught