• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by MonsterGamingHD · Mar 07, 2013 at 11:48 PM · buildgamewrongslender

Unity Wont Build Game Right

Please watch the video for the full problem:

http://www.youtube.com/watch?v=GqTTEv80CBo&feature=youtu.be

Comment
Statement

People who like this

1 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by BenKurdziel · Mar 08, 2013 at 02:13 AM

I'm not a master with building, but that's a memory error.

Computers work when programs ask something known as the "Kernal" for memory. The Kernal will then grab a piece of open memory and say "Here you go program, knock yourself out."

Sometimes however, the Kernal can grab a piece of memory that you don't have access to (it's being used by another program, you've gone over your allocated memory for one program, etc).

So without a ton of knowledge on your project. I'll make a few suggestions.

The first being to rebuild the game, there might have been an error in the build.

The second being try to Run As Administrator when you start the game.

The 3rd and most painful being that you may be using up too much system memory (also, if you set it to Realtime, it will crash anyway, never set a program to Realtime, High Priority is more than enough.)

If this is the case, you need to optimize your game. Check for excess colliders, rendered objects (if you have a ton of trees this will slow your game a lot, check for lighting (lights slow down your game a lot) if you have Pro and are using Shadows, consider light mapping the game (shadows are SUPER EXPENSIVE), if you have loops in your scripts they can cause memory bugs and slow the game as well.

Also, try out Occulusion Culling, there should be tutorials all over. The gist of it though is that you set any objects that aren't going to move (aka buildings, lamp posts, benches, etc) to be "static" (top right of the inspector) and then use Occlusion Culling (Bake the Scene) and the game will know not to render anything it is not seeing. You can use Occlusion Areas to achieve the same effect on moving characters or objects such as NPC's, etc.

Comment
BOSSNESS2020

People who like this

1 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Statement · Mar 08, 2013 at 12:22 AM

Ok it's nothing to do with your specific RAM. An access violation means that some code was trying to read memory that it has no access to (for example if the program tries to read memory that it hasn't allocated for itself - this is a protection mechanism). So there is an error somewhere. From the crash log you showed in the video, the crash is happening in the Unity executable. Why this is happening I can't tell from the overview that you presented, but the crash.dmp can be used with Visual Studio to get more clues. Also you should probably have a log file unless you turned that off in your player settings.

If you build a development build and enable the player log then you should look for clues toward the end of that log file. It might not be enough to isolate the problem. What you otherwise can do to narrow down on the issue is to put some Debug.Log in your collider code (it appears to crash as you collide with the terrain) and see if you enter and exit the collision callback correctly. Or more properly, you could **debug it with MonoDevelop** and step through the code to find the area of the crash and try to figure out why it crashes.

If you need help figuring out the cause of the crash (if you can't figure it out yourself with Debug.Log or MonoDevelops Debugger), you could post the player log file and crash folder contents so it is easier for us to view. But I recommend that you try and figure it out yourself first as I think you'll learn a lot from it, and you seem like a smart guy who likes to solve things for yourself. Debugging is a really good skill to learn.

Comment
BOSSNESS2020

People who like this

1 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Statement · Mar 08, 2013 at 12:26 AM 0
Share

Also, if you figure out what function it is crashing in, then you could update your question with the source code for that file or function if you can't figure it out yourself.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem with unity build 1 Answer

Distribute terrain in zones 3 Answers

Game crashes after build. 2 Answers

cause the object appears in front of the player when colliding with another object 0 Answers

Failed Unity game built on Xcode 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges