I can't build my game

Here’s the message what i get: cannot build player while editor is importing assets or compiling scripts
I’m not importing or compiling anything. I already tried to restart Unity, but didn’t worked.


Package manager:

2 Likes

Show us console errors.

Hello dude, i already solved it.

1 Like

Well, what was it? I have the same issue.

4 Likes

Never mind, I fount it, too. I had using UnityEditor in my script and removed it. Now I can build.

16 Likes

I have the same issue.

check your script, which one had “using UnityEditor”, delete it.

14 Likes

guys i have the same issue and really confused what to do.

2 Likes

Was this what was in your log?
Build completed with a result of ‘Failed’
UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

2 Likes

Look through all of the script you can. At the top of one there may be a line that says, “using UnityEditor;” Erase that and fix errors that it may cause.

I don’t know if there is a search function that will let you look for that, but if there is utilize that. I downloaded a pack that was actually from Unity themselves and the thing had the “using UnityEditor;” in it.

2 Likes

I have the same issue

how do you check your scripts

I checked all my scripts and it still does not work

My scripts say using UnityEngine. Is that the same as unityeditor?

2 Likes

If you are using 3rd party tools like snaps tools which use unityeditor then delete it for once you can import again. It works for me

1 Like

Which script I have to check? the script uneditable!

Hi, I deleted all of them but I still cannot build! any solutions?

Any in video solution, please?

go to the Project winndow> Assets folder> Scripts
hope that helps

1 Like

I need help with same issue guys, please.
I have just installed Unity and following the Kart tutorial created my first game, I wanted to try it on my Android phone6 but when I click Build and Run, it shows this: