Trouble Shooting
Manual     Reference     Scripting   
Unity Manual > Getting Started with Android Development > Trouble Shooting

Trouble Shooting

This section address common problems you can find when using Unity, please choose the platform you are having problems at.

Desktop

In MonoDevelop, the Debug button is greyed out!

  • This means that MonoDevelop was unable to find the Unity executable; in the MonoDevelop preferences go to the Unity/Debugger section, and then browse to where your Unity executable is located.

Is there a way to get rid of the welcome page in Mono Develop?

  • Yes, there is. In the MonoDevelop preferences, go to the Visual Style section, and uncheck "Load welcome page on startup".

Geforce 7300GT on OSX 10.6.4

  • Deferred rendering is disabled because materials are not displayed correctly for Geforce 7300GT on OX 10.6.4; This happens because of buggy video drivers.

On Windows x64, Unity crashes when my script throws a NullReferenceException

Graphics

Slow framerate and/or visual artifacts.

  • This may occur if your video card drivers are not up to date. Make sure you have the latest official drivers from your card vendor.

Shadows

I see no shadows at all!

  • Shadows are a Unity Pro only feature, so without Unity Pro you won't get shadows. Simpler shadow methods, like using a Projector, are still possible of course.
  • Shadows also require certain graphics hardware support. See Shadows page for details.
  • Check if shadows are not completely disabled in Quality Settings.
  • Shadows are currently not supported for Android and iOS mobile platforms.

Some of my objects do not cast or receive shadows

First, the Renderer has to have Receive Shadows on to have shadows on itself; and Cast Shadows on to cast shadows on other objects (both are on by default).

Next, only opaque objects cast and receive shadows; that means if you use built-in Transparent or Particle shaders then you'll get no shadows. In most cases it's possible to Transparent Cutout shaders (for objects like fences, vegetation etc.). If you use custom written Shaders, they have to be pixel-lit and use Geometry render queue. Objects using VertexLit shaders do not receive shadows either (but can cast shadows just fine).

Finally, only Pixel lights cast shadows. If you want to make sure that some light always casts shadows, no matter how many other lights are in the scene, set it to Force Pixel render mode (see Light documentation).

Android

Troubleshooting Android development

Unity fails to install your application to your device

  1. Verify that your computer can actually see and communicate with the device. More on this at Publishing Builds section.
  2. Please find the error (marked with red sign) in the Unity console. It should display a helpful error message.

Your application crashes immediately after start.

  1. Ensure you're not trying to use NativeActivity with devices that do not support it.
  2. Try removing any native plugins you have.
  3. Try to disable stripping.
  4. Use adb logcat to obtain the crash report from your device.

Building DEX Failed

This an error which will present itself similar to this

Building DEX Failed!
G:\Unity\JavaPluginSample\Temp/StagingArea> java -Xmx1024M 
-Djava.ext.dirs="G:/AndroidSDK/android-sdk_r09-windows\platform-tools/lib/" 
-jar "G:/AndroidSDK/android-sdk_r09-windows\platform-tools/lib/dx.jar" 
--dex --verbose --output=bin/classes.dex bin/classes.jar plugins
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

This is usually caused by a bad version of Java being installed on your machine. Try updating your Java install to the latest version and this will generally solve this issue.

Page last updated: 2011-02-24