User Tools

Upgrade Notes

Upgrade Notes

2.1 to 2.2

Due to the number of changes, changed script names and locations it is recommended to do a clean import of DWP2 when upgrading from 2.1 to 2.2.

The update from 2.1 to 2.2 is a large one. Things to note:

  • WaterObject material settings have been moved to a separate script: MassFromVolume and now requires button press (or a function call) to apply the mass.
  • WaterObject materials are now ScriptableObjects instead of a static list.
  • Cameras, VehicleChanger and other scene scripts are now shared between NWH Vehicle Physics 2 and Dynamic Water Physics 2. This improved the quality of DWP2 scripts but unfortunately it means that these scripts will need to be re-added and reconfigured.
  • InputSystem needs to be installed and Project Settings > Input Handling needs to be set to both for demo scenes to work properly.
  • Version 2.2 has a different approach to support for water systems. This has been greatly simplified but a re-setup will be needed. Check Water Asset Setup Guide for more info.
  • Input in 2.2 works differently. Check Input page for more info.
  • If using InputManager (old/classic Unity input) make sure to add Throttle and Steering axes to Project Settings ⇒ Input Manager as Horizontal and Vertical are no longer used.

1.x to 2.x

Due to a large number of changes between DWP1 and DWP2 most, if not all, objects will need to be reconfigured. DWP1 and DWP2 can co-exist in the same project due to different namespaces. Some scripts might have the same name in the AddComponent dialog if both versions are present. Due to Unity Asset Store importer not recognizing different namespace scripts as different files you can not directly import one version from the Store while the other is present. Download and import the new version into an empty project and then copy it over manually to be able to use both assets side by side. This is happening because some scripts retained their names in the new version and despite having completely different namespace Unity will still think they are the same script (only the filename is checked) and overwrite the one already inside the project. This means that if DWP2 is imported after DWP1, some of the scripts from DWP1 will be overwritten by those in DWP2.

The steps to import DWP2 with DWP1 present in the project would be: 1. Make sure that your project is using Unity 2018.4 or newer. 2. Create a new project using Unity 2018.4 or newer. 3. Import DWP2 from Asset Store into the new project. 4. Close the new project - ignore any errors if present (check README later for those). 5. Open file explorer and copy the DWP2 folder from the new project into the project you are upgrading. You could of course just delete DWP1 and import DWP2 but that will cause a lot of missing script errors on the existing objects, and it would make the upgrade method described below impossible. Water Object Manager DWP2 requires exactly one WaterObjectManager to be present in the scene. It does not matter to which object you attach it - usually it would be something like ‘SceneManager’ - it just has to be present as it does all the physics calculations.

Water Object

WaterObject (previously known as FloatingObject) editor has been rewritten and therefore the old one can not be used with the new system. Fastest way to upgrade would be removing the old Floating Object script, together with the old water effects system, and adding WaterObjectWizard component which will automatically configure the object. It is possible to run WaterObjectWizard on multiple objects at the same time. [Before upgrading it is always a good idea to make a backup] Step-by-step: ● Filter out WaterFX objects and remove WaterFX components: ● Do the same for FloatingObject. Do not deselect the objects afterwards. Add to the same objects that you have filtered WaterObjectWizard component. ● Tick the option for WaterParticleSystem (replaces WaterFX) if needed and run the wizard. ● Add WaterObjectManager to any object in the scene (usually SceneManager or similar). The scene is now upgraded. The settings will not carry over from WaterFX and FloatingObject to the new scripts so some manual tweaking is needed.