- Home /
"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???
what appears on the screen? did you add all the scenes to the build menu? have you used the input manager or have you used get$$anonymous$$ey? more info would be nice
Without knowing anything else, it seems to be a bug, because it has happened to other people, they could not solve it either. $$anonymous$$ake sure your scripts don't throw any exceptions, that might cause this, and try resetting your input settings. If all that fails, try re-installing Unity.
Answer by yosss · Jun 13, 2010 at 11:20 AM
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)
I may be having a similar problem. It seems like custom shaders and mouse input don't work in my web or standalone builds, but they are fine in the editor. I tried reimporting all my assets, but wasn't patient enough to try the other suggestions. Is this really the only solution??
Yea I got the same problem. $$anonymous$$y buttons are working when I run inside unity, but they are disappeared after I build the game. Do I really need to reimport everything of reinstall unity?? O$$anonymous$$G....
Where is my "editor asset directory" and my "build directory"? I really need some help
Answer by Marvin Hawkins · Jan 19, 2011 at 05:12 AM
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?
Answer by alalalalo · Apr 05, 2013 at 07:45 PM
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.
Please all report this bug with: "Relp" and then select "Report a bug" If the makers of Unity fix this problem would be great
Answer by murrayk012000 · Feb 19, 2014 at 04:54 PM
For me, the problem was fixed when I deleted the character controller folder from my standard assets.
Answer by dinneenio · May 20, 2014 at 06:32 PM
I had a miller problem. turned out i had two scripts with the same name. change/delete one and it worked fine.
Your answer
Follow this Question
Related Questions
Build Issues on Windows Standalone 0 Answers
Distribute terrain in zones 3 Answers
Build failed with errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer 0 Answers
Can't build my android project 1 Answer
Gradle build failed 2019.1 1 Answer