Importing

Installer

After importing into your project a dialogue will appear which checks for the basic requirements:

The following checks are performed:

  • Located Install Package: When the asset is imported both the installer and a separate package is imported. This separate package contains the character controller assets.
  • Unity 2021.3 or Newer: Unity 2021.3 is the minimum version. If you are running a prior version you’ll need to first install 2021.3 or newer.

This page describes the process if you are updating from a version prior to version 3.0. Assuming all of these requirements are satisfied you can click Install to import the latest version. The Opsive/Installer folder can then be removed.

Broken Assembly

After importing if you receive a broken assembly error make sure you’ve installed the version of the character controller that was exported for the version of Unity that you are using. If you purchased through the Asset Store you can reimport using the Package Manager. Opsive Store purchases include all of the necessary versions.

Unloading broken assembly Assets/Opsive/Shared/Editor/UIElements/Opsive.Shared.Editor.UIElements.dll, this assembly can cause crashes in the runtime

Import Errors

If you receive any errors upon import it is likely because of a namespace conflict. Lets say that you have an existing project and in that project you have a class named Health:

using UnityEngine;

public class Health : MonoBehaviour
{
    /// <summary>
    /// Damages the object.
    /// </summary>
    public void Damage()
    {
        // My implementation.
    }
}

If you have this class in your project and import the Ultimate Character Controller you’ll receive errors similar to:

Assets/Opsive/UltimateCharacterController/Demo/Scripts/DamageZone.cs(68,22): error CS1501: No overload for method `Damage’ takes `4′ arguments

The reason this error exists is because the original Health component in your project is corrupting the global namespace and the compiler which doesn’t know which Health component to use. The fix for this is to ensure all classes are in a namespace. You can fix this error by adding my original Health component to its own namespace:

using UnityEngine;

namespace MyProject
{
    public class Health : MonoBehaviour
    {
        /// <summary>
        /// Damages the object.
        /// </summary>
        public void Damage()
        {
            // My implementation.
        }
    }
}

Assembly Definitions

The Ultimate Character Controller uses its own Assembly Definition files to decrease overall project compilation time. If you’d like to access an Ultimate Character Controller object through scripting ensure you have first added the Opsive.UltimateCharacterController Assembly Definition to your own Assembly Definition file.

Lightmapping

In order to reduce the download size the demo scene does not contain any lightmapping. When the scene first opens it will appear dark and this can be corrected by baking the scene. If the lights are not baked before hitting play they will automatically be disabled.

TextMesh Pro

The demo scene within the Ultimate Character Controller uses TextMesh Pro. TextMesh Pro must first be installed in order for the demo scene to properly function. The base character controller does not require TextMesh Pro.

Import Time

The Ultimate Character Controller contains many animations/textures which increase the amount of time that it takes to import the asset. If you don’t care about the demo scene content and want an extremely fast import time you can deselect the Opsive/UltimateCharacterController/Demo folder and it will not bring in any assets used within the demo scene. Note that this will not bring in any animator controllers or animations so if you want these make sure you import the Demo/Animations and Demo/Animator folders.

Animation Import Warnings

When you import the Ultimate Character Controller into a fresh project you should receive no errors but there will be some warnings related to the animations, such as:

File ‘AimWalkFwd’ has animation import warnings. See Import Messages in Animation Import Settings for more details.

The reason this warning exists is because the animations were authored in Blender and Unity doesn’t like the way Blender exported the animation. Unfortunately there’s not a way around this but this is a one time warning and does not affect the animations when they are playing.