Vehicle Physics Pro November 2017 Update

This post contains instructions for upgrading existing projects that use Vehicle Physics Pro to the latest November 2017 version that will be deployed next Friday 10th November at 10am UTC. Licensees of the Professional and Enterprise licenses should read these instructions in order to update their project(s).

Why this update requires special instructions?

  1. The repository Vehicle Physics Core Assets is replaced by the new repository Vehicle Physics Sample Assets.
  2. All scripts and components are now under namespaces. Some classes and methods have also been renamed.

As result of 1) the update may require removing a submodule from the project, which is a non-trivial task.

When should I apply this update?

The update will be deployed at the master branch next Friday 10th November at 10am UTC. The remote repository Vehicle Physics Core Assets will be no longer available after that time.

How this update affects my project(s)?

Depending on how are you using VPP in your projects:

  • If you don’t use the repository Vehicle Physics Core Assets then you don’t have to do anything special. Just update the other VPP repositories normally and follow the indications below for updating your scripts.
  • If you’ve cloned the repository Vehicle Physics Pro, which contains the main development project for Unity, then simply remove your local copy and clone it again.
  • If you’ve included the VPP repositories in your project as isolated GIT repositories or regular folders (no submodules) then simply delete the folder with the repository Vehicle Physics Core Assets and include the new repository Vehicle Physics Sample Assets in your project.
  • If you’ve included the VPP repositories as submodules in your project, including Vehicle Physics Core Assets, then follow the instructions below for replacing the submodule with the new one.

How to upgrade the submodule Vehicle Physics Core Assets in my project?

Remove the submodule Vehicle Physics Core Assets entirely, then add the repository Vehicle Physics Sample Assets as new submodule.

As stated above, you don’t need to do this if you don’t use Vehicle Physics Core Assets in your project, or you use it but it’s not included as GIT submodule.

  1. Ensure there are no uncommitted local changes in your project or any of your project’s submodules.
  2. Close Unity.
  3. Update the VPP submodules normally.
  4. Remove the submodule Vehicle Physics Core Assets.
    Open GIT Bash. This code assumes the submodule to be located in the path “Assets/Core/Vehicle Physics core assets” (otherwise use the correct path here):

    git submodule deinit -f Assets/Core/Vehicle\ Physics\ core\ assets
    rm -rf .git/modules/Assets/Core/Vehicle\ Physics\ core\ assets
    git rm -f Assets/Core/Vehicle\ Physics\ core\ assets
  5. Clone the new submodule Vehicle Physics Sample Assets
    This code will clone the submodule in the path “Assets/Core/Vehicle Physics core assets”. Use the proper path if necessary.

    git clone ssh://git@projects.edy.es/edy/vehicle-physics-sample-assets.git Assets/Core/Vehicle\ Physics\ Sample\ Assets
  6. Open your project in Unity. The assets will be reimported.
  7. Update your scripts following the indications below.

How to update the scripts after applying the upgrade?

Open the upgraded project in Unity. Most errors will suggest the namespace to use themselves.

  • Namespace EdyCommonTools for the components and scripts in Common Tools Core.
  • Namespace VehiclePhysics for the components and scripts in Vehicle Physics Core.
  • Math methods are now part of the static MathUtility class in the EdyCommonTools namespace. For example: CommonTools.FastAbs -> MathUtility.FastAbs