When i try to build my game... Issues occur

When i tried to build my game to test it, i got this error:

Error building Player because scripts have compile errors in the editor

Upon checking the editor log, i found this:

Refresh: detecting if any assets need to be imported or removed … Refresh: elapses 0.007433 seconds (Nothing changed)
Error building Player because scripts have compile errors in the editor

(Filename: Line: -1)

Unloading 1 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 142.3 MB.
System memory in use after: 142.5 MB.

Unloading 1 unused Assets to reduce memory usage. Loaded Objects now: 3399.
Total: 13.791939 ms (FindLiveObjects: 0.693588 ms CreateObjectMapping: 0.054516 ms MarkObjects: 13.009963 ms DeleteObjects: 0.028612 ms)

*** Cancelled ‘Build.Player.MacStandaloneSupport’ in 0 seconds (434 ms)

Any help?

Hi @Gavbean,

i would recommend checking your console to see if you have any warnings (the red icon’s)
since there might be a problem in one of your scripts your using >
(Error building Player because scripts have compile errors in the editor)

and just in case if you are using:

public gameobject objectname;

or

[serialize field]
private gameobject objectname;

then check if you put the objects in the object or script you are trying to use since that might also give some errors

also does the game work when you start the game in the editor? beacus your problem might come from that

and check if you added the scene to the build your trying to make

i hope one of these might fix your problem

How much space do you have left on your hard drive or SSD, the place you are building project to?

I am not sure if this is correct so please don’t “dislike” my answer if it’s wrong.

It says in the Editor Log: “Scripts have compile errors”. That means you have errors in one (or not only one) script.
Try testing your game in Unity!

But again I am really not sure if I’m correct.