Dynamic Water Physics 2 Documentation
Action disabled: source
Docs » UpgradeNotes

Upgrade Notes

Dynamic Water Physics 2

2.6 to 2.7

  • Clean import required.
  • Required adjustment of CenterOfMass on VariableCenterOfMass script since the CoM is now set as an absolute value instead of an offset.

2.5.5 to 2.5.6

  • Clean import required.
  • WaterDataProviders moved from renaming the files to remove the .txt extension to using Scripting Define Symbols. Check the WaterDataProvider documentation for the new instructions.

2.5.3 to 2.5.4

  • Clean import required.

2.5.2 to 2.5.3

  • VariableCenterOfMass Center Of Mass Offset and Inertia Scale might need re-adjusting due to changes in the VariableCenterOfMass script. Effective inertia in the new version will be ~3 times lower than the calculated value in the previous version. Due to the bug fix that affected center of mass calculation, the center of mass with the new version will be different if any IMassAffectors have been attached.

2.4.x to 2.5

  • WaterObjects will need to have their simulation meshes re-generated by pressing Water Object ⇒ Update Simulation Mesh.
  • WaterObjectManager has been removed and the settings have moved to individual WaterObjects.
  • WaterDataProvider now requires a Collider attached to the same GameObject with Is Trigger enabled. Objects that are inside this trigger volume will use the data from that WaterDataProvider.
  • WaterObject can now work without any WaterDataProviders present. defaultWaterHeight, defaultWaterNormal and defaultWaterFlow will be used in this case.

2.4.1 to 2.4.2

  • Asset now uses single assembly definition placed in the root directory of the asset, named NWH.DWP2. Any references that need to be added to external water assets now have to be added here instead of the NWH.DWP2.WaterData assembly definition.

2.3 to 2.4

  • Clean import is required.
  • Project Settings > Player > Api Combatibility Level needs to be set to .NET 4.x.
  • CenterOfMass script was replaced with VariableCenterOfMass.
  • Since 2.4 the asset uses assembly definition files. This might cause issues with projects that do not use .asmdef files and errors along the lines of “The type or namespace 'x' could not be found…”. The solution is to either make the project use .asmdef files or to delete all the .asmdef files inside the this asset's directory. This is because the whole project needs to use assembly definitions or not use them at all. More about this here: Assembly Definitions
  • Any 3rd party water asset will need to have .asmdef added (if not already present such as with Crest) and referenced inside the NWH.DWP2.WaterData assembly definition (NWH > Dynamic Water Physics 2 > Scripts > WaterDataProvider). Alternative is to remove all assembly definition (.asmdef) files from the asset as mentioned in the step above.

2.2 to 2.3

Due to asset restructure it is recommended to do a clean import of DWP2 when upgrading from 2.2 to 2.3.

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.

Previous Next

Dynamic Water Physics 2 Documentation

Table of Contents

Table of Contents

  • Upgrade Notes
      • 2.6 to 2.7
      • 2.5.5 to 2.5.6
      • 2.5.3 to 2.5.4
      • 2.5.2 to 2.5.3
      • 2.4.x to 2.5
      • 2.4.1 to 2.4.2
      • 2.3 to 2.4
      • 2.2 to 2.3
      • 2.1 to 2.2
      • 1.x to 2.x
  • About
  • Quick Start
  • WaterObject
  • WaterParticleSystem
  • Input
  • AdvancedShipController
  • SailController
  • Submarine
  • Supported Water Assets
  • NWH Common Scripts
  • Helper Scripts
  • Demos
  • Upgrade Notes
  • Changelog
  • Support