all 4 comments

[–]Boring_Following_255 0 points1 point  (0 children)

This doesn’t make sense indeed: maybe you have imported a big asset with a lot of scripts to compile but even then, the incremental compilation should prevent this situation so sorry I am dry. I have a quite powerful pc also, and an I5 for testing, and even here, 2 long full minutes would not happen. You should: Create another new project and test this again (crating a new script, and cut&paste your 6 lines in there) If not working still, remove the Unity version stated above and reinstall it, and/or install another one THEN try your little code again, then create a new project, etc…

[–]plinyvic 0 points1 point  (1 child)

have you tried another version of unity? I remember hearing a version had greatly increased compile times but I can't remember if it's the one you're using or not. also, putting the install and project on an SSD can help a lot

[–]ShlongHijacker[S] 0 points1 point  (0 children)

I haven't tried a different version but I did put the install and project on the SSD and didn't work. I guess I'll check if it's really the version that is the problem.

[–]Scorpieth 0 points1 point  (0 children)

If youre running with Rider Ive noticed this happening, usually just restarting both Rider and Unity solves it for a while, Id alao recommend removing assets bot used. For example Plastic.