"Build & Run" problem

Hey everyone!

I’ve run into an issue when building & running (exporting) a game, hoping someone here can give me a little help as to why…
After exporting my game, it doesn’t appear to be working (can’t interact with anything, use inputs, or run any scripts), though it worked fine playing in editor mode. I’ve tried remapping the inputs and building in to different folders, but still no good.

Any ideas for a solution?

Notes: Everything looks the same as in game view, but just that the physics or scripts aren't running.

All scenes are in the build and settings, main menu and game level can load each other in editor mode, just not in actual game.

Update 5-12-10:

Problem solved! (sort of)

I tried many possible solutions on this forum, then when I rebuilt everything in the Standard Assets folder everything just magically seemed to work. There must be a problem with recognizing scripts outside the usual folders. For example: for my main menu, the simple script


function OnMouseEnter()
    //changes the color of the text
    renderer.material.color = Color.red;


attached to a box collider around 3D text didn’t work at all, even after just exporting that one scene.

(Later that day)

Now I seem to have run into the same problem, again. I decided to go back and add an elevator in my game level, a simple up-down cube animation and a child trigger attached with the following script:


var platform : Transform;
var player : Transform;

function OnTriggerEnter () { var GO = platform; var GO1 = player; GO1.transform.parent = GO.transform; }

function OnTriggerExit () { var GO = platform; var GO1 = player; GO1.transform.parent = null; }



I tried moving the script into different folders, but it didn’t work this time. As before, it worked fine in editor mode, just seems like the script was removed after exporting into a windows standalone.

Anyone else have similar problems???

There is a unity bug , it has happened to me twice No scripts work in build , only the pre-existing ones Solutions:

1: Move around the scripts , place em all into standard assets or somewhere else and generally move around.

2:Reimport everything

3: create a new project and recreate everything

4:reinstall unity , see if custom scripts work , if they dont repeat solution 4 , if they do recreate everything (this worked for me)

Sorry to rehash an old topic, but is the consensus that you need to make sure that everything is in the standard assets folder? I'm having a similar issue right now, and I placed my assets into subfolders (ie code in the script folder, art in the art etc). Could this attempt at organization be killing the game at build-runtime?

You probably have a runtime error. You can do a “Development build” and then get logs in the “output_log.txt” file. For my part, I had a log about text assets that were missing. I manually copied them from my editor asset directory to my build directory and then it worked.

For me, the problem was fixed when I deleted the character controller folder from my standard assets.

I had a miller problem. turned out i had two scripts with the same name. change/delete one and it worked fine.

Mine was because i had a js script of the same name as a csharp. deleting it resolved the issue. :slight_smile:

It’s easy to fix. you just have to change the storage path for your projekt. It worked 4 me. i use Unity 2017.1.0f3 Personal 64bit