Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Game 2D Water Kit

Discussion in 'Assets and Asset Store' started by HaydeLudos, Jun 25, 2018.

  1. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    :) Version 1.4.8 is out!! :)

    Game 2D Water Kit allows you to create fast, dynamic, and nice-looking 2D water and waterfalls.

    Supported Render Pipelines:

    ✅ Standard (Default) Render Pipeline (Unity 2018.4 or newer)
    ✅ Lightweight Render Pipeline - LWRP 6.7 or higher, 2D Renderer (Unity 2019.2)
    ✅ Universal Render Pipeline - URP, 2D Renderer (Unity 2019.3 or newer)



    Key Features:
    • Highly customizable water and waterfall systems
    • Top performance across platforms - Mobile friendly
    • Well-integrated into the Unity Editor with clean and well-organized inspectors
    • Quickly tweak and test the water and the waterfall simulation properties in edit-mode
    • Seamless integration into the Sprite workflow:
      • Easily sort the water/waterfall object relative to sprites using sorting layers
      • Hide or reveal parts of the water/waterfall object using Sprite Masks and Mesh Masks

    Water System:
    • Optimized real-time refraction and reflection effects
    • Dynamic waves with 4 different types of ripples:
      • On-Collision Ripples:
        • Created when a rigidbody falls into the water
        • Created when a rigidbody gets out of water
        • Created when a rigidbody moves in water
      • Constant Ripples: Created at regular time intervals
      • Script-Generated Ripples: Created in code
      • Waterfall Ripples: Created by a waterfall object that overlaps the water object
    • Sine waves
    • Waves Can Affect Rigidbodies: Rigidbodies floating on water follow the undulations of water waves
    • Customizable sound and particle effects for each type of ripple (excluding the waterfall ripples), with an efficient object pooling system
    • Easily create very large (limited to a specific region) or endless water areas with great performance
    • Fake perspective effect: Add a sense of depth to your scene by rendering certain objects as partially submerged into water
    • Set a solid or gradient color, a texture, or even a texture sheet animation and apply distortion effects, across the water body and/or surface
    • Animate the water size either in code, or using Unity animation system
    • 8 optimized water shaders:
      • 4 shaders for the Builtin Render Pipeline: 1 unlit, and 3 lit shaders (pixel-lit, vertex-lit, and vertex-lit-only-directional-lights)
      • 2 shaders for the Lightweight Render Pipeline: 1 unlit and 1 lit shader (supports the 2D Renderer)
      • 2 shaders for the Universal Render Pipeline: 1 unlit and 1 lit shader (supports the 2D Renderer)

    Waterfall System:
    • Optimized real-time refraction effect
    • Can interact with water systems it overlaps, disturbing their surfaces and creating ripples
    • Set a solid or gradient color, a texture, or even a texture sheet animation and apply distortion effects, across the waterfall body, left-right edges, and top-bottom edges
    • 8 optimized waterfall shaders:
      • 4 shaders for the Builtin Render Pipeline: 1 unlit, and 3 lit shaders (pixel-lit, vertex-lit, and vertex-lit-only-directional-lights)
      • 2 shaders for the Lightweight Render Pipeline: 1 unlit and 1 lit shader (supports the 2D Renderer)
      • 2 shaders for the Universal Render Pipeline: 1 unlit and 1 lit shader (supports the 2D Renderer)

    For more information, please check:

    Asset Store Page
     
    Last edited: Sep 10, 2021
  2. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Looks great! I'm thinking of grabbing this but I have a few questions...

    1. What's the purpose of the Prefab Utility you mention in the documentation? Does this plugin support Unity's standard prefab workflow as default too, or do you have to use the Prefab Utility?

    2. How does this plugin play with Unity's own Pixel Perfect package? I could imagine that depending which one takes precedence, reflections and refraction might look a bit weird and distort low-res pixel artwork quite heavily. Any observations there?
     
  3. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Thanks! :)

    1- The plugin uses Unity's standard prefab workflow. Prefab Utility just makes sure that the prefab is saved properly.
    When you first create the water object in your scene, the water script will create a new material to be used by the water's MeshRenderer and a noise texture to be used by the newly created material. This material and the noise texture are not saved as assets in your project yet, they belong to the scene and get serialized with that scene.
    So, if you simply drag and drop the water object from the hierarchy to the project view, Unity will create a prefab but it will not save the material with it, and the prefab will end up with a missing material!
    To get around this issue, Prefab Utility will take care of saving the material and its noise texture in your project first, then it will create the prefab.
    You just need to specify where you want to save the prefab, press the "Create Prefab" button and done! :D

    2- The plugin was tested with Unity's own Pixel Perfect package, and it works just fine! :D
     
    Last edited: Jan 10, 2019
    DrOcto likes this.
  4. LessThanEuan

    LessThanEuan

    Joined:
    Nov 4, 2018
    Posts:
    2
    Hi there, first of all thanks for the assets! The water effects look great and I'm having great fun with all features. I'm fairly new to Unity and am looking to do a couple of things with C# scripts:
    1. how do you change the color of the Game2d water material? The attached script works when attached to sprites but I can't figure out how to adapt it to the water material.
    2. how would you change the liquid depth? E.g. push a button and liquid depth goes up, push another it goes down
    Any help much appreciated :)
     

    Attached Files:

    HaydeLudos likes this.
  5. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello!
    Thank you so much! I'm so glad you're having fun with the asset ^^

    [EDIT]
    As of version 1.3, it's now much easier to change the water colour at runtime. I have attached an updated version of the script.


    1- I adapted the script so it should work now with the water material too, and it sets a random colour each time you press the R key! If anything still unclear, please let me know :)

    (Sorry for the bad gif quality)


    [EDIT]
    2- As of version 1.3, you can use the method
    .AnimationModule.AnimateWaterSize(targetSize,duration,constraint,wrapMode)

    • targetSize: [Vector2]: sets the water target size.
    • duration: [float]: sets the animation duration in seconds.
    • constraint: [enum WaterAnimationConstraint]: constraints the position of one/multiple water edge(s).
      • None, Top, Bottom, Left, Right, TopLeft, TopRight, BottomLeft, BottomRight
    • wrapMode: [enum WaterAnimationWrapMode]:
      • Once: Stops playing the animation once the target size is reached.
      • Loop: The water size is reset to the initial size and the animation is restarted once the target size is reached.
      • PingPong: When the target size is reached, the initial size will be the new target size. So the water size will ping-pong back and forth between the initial and the target size.
    For more information please check https://game2dwaterkit.haydeludos.com/water-system/water-size-animation/

    [ORIGINAL REPLY]

    2- A straightforward solution would be to use Unity Animation system. So you could create two animation clips to animate the water size (here you just need to change the water height (y value)): one animation clip for increasing the water depth(height) and one for decreasing it. Then, you control which of the two animations to play inside your script depending on the pressed key. The water script will then detect the change to the water size and will update accordingly.
    But, there's a better and more flexible solution to the problem IMO that will avoid the hassle of creating the animation clips and managing the controller(animation controller) animations states. We could implement a new public method inside the water script that gets the target depth (and maybe another parameter to set the animation speed (how fast we reach the target depth)), and then we update the water size inside the water script's update method each frame until the target depth is reached. Then inside your script, you just need to reference the water object and then call the new method with the proper target depth depending on the pressed button. Please feel free to contact me (please check the contact page on my website) so I could provide you with the steps to set up the first solution, or the necessary changes to the water script if you'de like to implement the second solution.

    (Implemented the second solution here)


    Please let me know if anything is still unclear :)
     

    Attached Files:

    Last edited: May 11, 2020
    AngelKraft likes this.
  6. LessThanEuan

    LessThanEuan

    Joined:
    Nov 4, 2018
    Posts:
    2
    Hi, thanks for your help! Your attached script runs perfectly and is laid out in a way that I can easily adapt. I've sent you a message with regards to my second question, I think what you've described is bang on :)
     
    HaydeLudos likes this.
  7. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Good to hear ^^
    I've just replied to your message :)
     
  8. hyenabyte

    hyenabyte

    Joined:
    Mar 5, 2017
    Posts:
    3
    Hello. Love your asset, super versatile and neat looking.

    I'm having a problem with sprite layering.
    I noticed the options for sorting layers and order in layer is in the rendering options, but they don't seem to do anything when I use them, do I need to enable something for it to work? So far I have to move gameobjects in front or behind the water with their transforms, and while it works fine, it would be super neat if I could manage it with sprite layers instead.

    Thanks!
     
    HaydeLudos likes this.
  9. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello, so happy you love the asset ^^

    [UPDATED REPLY]
    As of version 1.4, you can easily sort the water/waterfall object relative to sprites using sorting layers without any problem!

    For more information, please check https://game2dwaterkit.haydeludos.com/water-system/#sorting-the-water-object-relative-to-sprites


    [OLD REPLY]
    Opaque objects (Geometry render queue) are rendered before transparent objects (Transparent render queue). And when rendering each queue, objects belonging to that queue are first sorted by various criteria (the sorting layer is just one of these criteria), then get rendered.
    Hence, if the water's rendering mode (in the water material editor) is set to Opaque, the water's sorting order will be relative to other opaque objects and if it is set to Transparent, the water's sorting order will be relative to other transparent objects (eg: Sprites).
    So to control the rendering order of the water object relative to the sprites using sorting layers, the water rendering mode should be set to Transparent. Unfortunately, the water refraction and reflection effects are not available in that mode.
    Therefore, the best way to order the water object relative to the sprites is to keep the water rendering mode to opaque and move the sprites slightly behind and in front of the water, just like you did :D


    If anything is still unclear, please let me know!
     
    Last edited: May 6, 2020
    hyenabyte likes this.
  10. hyenabyte

    hyenabyte

    Joined:
    Mar 5, 2017
    Posts:
    3
    Gotcha! Thank you for your answer :)
     
    HaydeLudos likes this.
  11. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    You're welcome! :)
     
  12. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    v1.3 Update should be available next week, and it will bring many improvements and exciting new features.
    Any suggestions are greatly appreciated!

    [Edit] Version 1.3 is now live!


    Stay tuned! :)
     
    Last edited: Feb 21, 2019
    hyenabyte likes this.
  13. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Good to know! :)

    For what it's worth, I always thought the water in Rainworld looked phenomenal:


    I wonder if you could achieve a similar effect by offsetting the upper vertices on the surface strip? I don't know enough about how it all works to provide much help here unfortunately, but just an idea.
     
    DrOcto and HaydeLudos like this.
  14. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Great idea! :)
    I'm definitely going to work on a similar effect. This would take some time to implement and test, so probably will be part of v1.4 update.
    For now, though, I'm focusing on getting the update ready for release: improving the inspector, cleaning up and profiling the code.

    Thank you ;)
     
    Last edited: Jan 10, 2019
    DrOcto likes this.
  15. squall06

    squall06

    Joined:
    Jul 11, 2016
    Posts:
    1
    Can we change the type of water material being used and if so how difficult is that?
     
  16. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello!
    Could you please clarify what do you mean with the type of water material?
     
    Last edited: Jan 17, 2019
  17. Riku_Tatsu

    Riku_Tatsu

    Joined:
    Dec 29, 2016
    Posts:
    2
    DrOcto and HaydeLudos like this.
  18. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Version 1.4 is released! :):)

    What's new?

    -New waterfall system
    -Added support for the Lightweight Render Pipeline (LWRP) / Universal Render Pipeline (URP) [Upgrade Guide: https://game2dwaterkit.haydeludos.com/upgrade-render-pipeline/]
    -Simulation Mode: Quickly tweak and test water/waterfall simulation properties in edit-mode
    -Added support for perspective and isometric camera projections
    -Gradient Color for the water surface -Texture Stretch tiling mode
    -Texture Scrolling
    -Reflection Fade
    -Change Tint-Colors/Textures apply order
    -Scale the reflection viewing frustum height
    -Full support for sorting layers: You can now easily sort the water/waterfall object relative to sprites using sorting layers
    -Sprite Mask Interaction: You can now hide/reveal parts of the water/waterfall object using Sprite Masks
    -You can now define a fixed size for the refraction/reflection render-textures.
    -Greatly improved the inspectors.

    Note:
    This version adopts a new folder structure, mainly a Runtime folder (scripts and shaders) and an Editor folder (custom editor scripts). So in case you already have prior versions of the asset in your project and want to adopt this new folder structure, please follow these upgrade instructions:
    1- Open a new empty scene
    2- Delete Game2DWaterKit folder
    3- Import the new package

    For more information:
    Water System Guide: https://game2dwaterkit.haydeludos.com/water-system/
    Waterfall System Guide: https://game2dwaterkit.haydeludos.com/waterfall-system/
     
    Last edited: May 11, 2020
    DrOcto likes this.
  19. Ko_dll

    Ko_dll

    Joined:
    Apr 19, 2014
    Posts:
    2
    Hello HaydeLudos,
    I have an issue with generating shaders when building a project on Windows10. I am using unity 2019.2.6f1 and it takes ages = 8 hours and I am still in the middle of shaders generation. I have around 4 millions small files created in Library/ShaderCache before I cancel this build process and it was still in the middle of shaders generation. Do you have any advice, how to optimize that? Before adding game-2d-water-kit it was a matter of a few seconds to create a build.
     
  20. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,

    I've recently came across this issue, and it turned out that adding any of the "Game2D Water Kit" shaders to the "Always Included Shaders", in the Graphics settings, causes very very long build process.
    I'm still investigating to see what's exactly causing it. But for the time being, you can get rid of this issue by removing any "Game2D Water kit" shaders entries in the "Always Included Shaders" list. Then, please move the shaders to the "Resources" folder.

    Shaders path: Game2DWaterKit/Runtime/Shaders
    Resources folder path: Game2DWaterKit/Runtime/Shaders/Resources

    Thank you! :)
     
    Last edited: Jan 21, 2020
  21. Ko_dll

    Ko_dll

    Joined:
    Apr 19, 2014
    Posts:
    2
    Hello Hayde - your solution works absolutely great way. My building time is back to seconds. You saved me a lot of grey hairs :) Thank you very much!!!
     
    HaydeLudos likes this.
  22. Makkezi

    Makkezi

    Joined:
    Aug 1, 2018
    Posts:
    10
  23. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello @Makkezi :)

    I'm sorry, but I don't understand what you mean!
     
  24. Makkezi

    Makkezi

    Joined:
    Aug 1, 2018
    Posts:
    10
    This is the official scene presented by Unity at the conference with great light and materials. I create my project using it as a basis, will your tool work with this project? Need work with 2d light. Could you please check, install it for 3 minutes and check your instrument. If it works, I will immediately buy it!
    Thanks.
     
    Last edited: Mar 17, 2020
  25. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Thank you for clarifying! :)

    Yes! The asset supports URP and the 2D Renderer (2D lights)!

    I tested the asset in the Lost Crypt sample project, and it works well

    Please contact me https://game2dwaterkit.haydeludos.com/contact/ ;)





     
  26. Makkezi

    Makkezi

    Joined:
    Aug 1, 2018
    Posts:
    10
    Wow! Said and Done.
     
    HaydeLudos likes this.
  27. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Version 1.4.4 got published today! :D:D

    New features:
    • Waves Can Affect Rigidbodies: Rigidbodies, that are floating on water, can follow the undulations of water waves
    • On-Water-Move ripples: Ripples that are created when a rigidbody moves in water
    • Surface outlines: Draw the outlines of the surface of water: water top-edge, surface-level and submerge-level

    Feel free to check the asset store page here
     
    Last edited: May 11, 2020
    CrowbarSka likes this.
  28. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Version 1.4.5 is now live! :D:D

    New features:
    • Added the option to set a fixed thickness for the edges of waterfall systems
    • Added the option to set an offset for the edges of waterfall systems
    • Added the option to make the top edge of a waterfall system wider or narrower than the bottom edge, and vice versa
    • Added the option to limit the large water area to a specific region
    • Added a new function to the WaterMainModule that retrieves the height of the water at a specific point (MainModule.GetWaterHeightAtSpcificPoint(float xPositionInWorldSpaceOfSomePoint))
    • Added a Game2DWaterKitObject.TimeScale property to control the scale at which time passes for all water and waterfalls animations and physics simulations independently of Unity's Time.timeScale
    Feel free to check the asset store page here
     
  29. AlstonA

    AlstonA

    Joined:
    Jun 13, 2013
    Posts:
    24
    Hello, I am purchasing the product today and I am interested in seeing if there is a pre-built way to add splashes and particle effects when the player comes into contact with the water. I am also considering using this with the corgi engine; but, i was not sure if anyone has tried this with that asset.
     
  30. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,

    You can have a sound effect and a particle effect for each type of ripple: On-Collision ripples, Constant ripples, and Script-Generated ripples.

    For more information, please check this page: https://game2dwaterkit.haydeludos.c...on-water-enter-and-on-water-exit-sound-effect

    Regarding Gorgi Engine, I didn't test it myself, but when checking its documentation, I can see that it implements its own physics (raycast based), however, it still uses 2D colliders. So in case the water doesn't react to colliding objects, the asset already has an event, OnWaterEnterExit(Game2DWater waterObject, Collider2D collider, bool isColliderEnteringWater),
    that you can subscribe to once at Start, so you can use it to create ripples (script-generated ripples) whenever an object gets into or out of water. Please find an example of this use case here: https://game2dwaterkit.haydeludos.c...tion/#on-water-enter-and-on-water-exit-events

    If you need any assisstance, feel free to reach me through email :): https://game2dwaterkit.haydeludos.com/contact/
     
    Last edited: Jul 22, 2020
  31. pmilholl

    pmilholl

    Joined:
    Sep 10, 2020
    Posts:
    3
    Hello, I want to create 8 different waterfalls in my scene with each having their own color. What is the easiest way to do this? Every time I create a new Waterfall and then change the color, it changes the color for all of them,
     
  32. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    When duplicating a waterfall, the original waterfall and its new duplicate will be using the same material. So whenever you change one of the waterfall's color, the other one changes too. In order to fix this, you need to create different materials for different waterfalls. I know this can get a bit tedious especially when having many waterfalls and each one of them has to have a different color or any of the other material properties different to the other ones, so could you please reach out to me (https://game2dwaterkit.haydeludos.com/contact/) so I can provide you with a modified asset that enables you to keep using the same material for different waterfalls and also lets you specify the color under the waterfall component inspector (per-object basis) instead of under the waterfall material inspector.
     
  33. chaosmonger

    chaosmonger

    Joined:
    Jan 23, 2019
    Posts:
    71
    Hello, I'm using Game 2D Waterkit v1.4.8 for my game Clunky Hero.
    However, I've an issue... looks like a bug, I'm not sure.
    Basically I've created custom materials that I apply to different water areas (for instance I've a red color for a dangerous area, or one which has a thickier or thinnier surface based on the depth of my water area, and so forth...).
    However, both in Editor and in Build, the water is not animated and/or looks flat (it is correct though if I use the default material). Weird thing: if I'm in Editor and I expand the material drop-arrow from Inspector and then I click play, my water becomes animated and works properly. But can't manage to achieve that on a Build, which I hope to work right away.
    Any ideas?
    Do I have to update? (it's weird because I see you updated the tool on 30th August, and yet it's v1.4.8?)
    Or how can I solve it without update? (it's always risky to update)
     
  34. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,

    If the material is saved as an asset in your project, then you need to have the noise texture saved with it as well. For that, please select your material and press the button entitled "Add Missing Noise Texture To Project". This will create the noise texture which is used by the material to apply the refraction/reflection effects in the same directory where your material is located.



    Do I have to update? (it's weird because I see you updated the tool on 30th August, and yet it's v1.4.8?)

    Yes, the update is kept to version 1.4.8 because there were no major features added to the asset. It's mainly a patch to fix some issues and to add minor features. Those are the recent changes.



    I hope this helps! :)
     
  35. chaosmonger

    chaosmonger

    Joined:
    Jan 23, 2019
    Posts:
    71
    Great! Looks like it works now! Thanks a lot
     
    HaydeLudos likes this.
  36. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Glad to be of help! :)
     
  37. Xiddo

    Xiddo

    Joined:
    Jan 2, 2021
    Posts:
    4
    I've been using the 2D Water package for quite a while now, and I absolutely love it! It's great value and helped me a lot.
    But I'm having a bit of trouble with it right now, don't worry, no bugs. Just I can't find how to "Fix Scale" through code. And it's essential for me because I'm generating the world randomly.
     
  38. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    I have replied to your email, @Xiddo :)
     
  39. chaosmonger

    chaosmonger

    Joined:
    Jan 23, 2019
    Posts:
    71
    Hello, I'm having an error in update related with particles... Still using v1.4.8.
    The error I get is the following:
    Code (CSharp):
    1. MissingReferenceException: The object of type 'ParticleSystem' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. Game2DWaterKit.Ripples.Effects.WaterRipplesParticleEffect.Update () (at Assets/Third Party Stuff/Game2DWaterKit/Runtime/Scripts/Ripples/Effects/WaterRipplesParticleEffect.cs:61)
    4. Game2DWaterKit.Ripples.WaterCollisionRipplesModule.Update () (at Assets/Third Party Stuff/Game2DWaterKit/Runtime/Scripts/Ripples/WaterCollisionRipplesModule.cs:143)
    5. Game2DWaterKit.Game2DWater.RegularUpdate () (at Assets/Third Party Stuff/Game2DWaterKit/Runtime/Scripts/Game2DWater.cs:299)
    6. Game2DWaterKit.Game2DWaterKitObject.LateUpdate () (at Assets/Third Party Stuff/Game2DWaterKit/Runtime/Scripts/Game2DWaterKitObject.cs:89)
    It seems related with the pool size, maybe... But the behavior is very strange. I've set a pool of 20 particles, I jump in the water some certain amount of times, then I start getting that error. I have the "can expand" activated, but for some reasons it seems it's not expanding... And the problem is that I get it at update, so 999+ times, not only when I jump again in the water... I mean, it STARTS at some point when I jump in the water, but then it keeps giving me error until I quit, even without entering the water again. And the fun fact is that when I enter the water again, the particle is correctly displayed. So I'm not sure what's happening. Maybe at random, one of my jumps in the water, trigger that error? So it's not related with the pool size at all? Just a glitch? Any idea how to avoid it?
     
  40. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,

    The issue you're facing seems unrelated to the pool size. To assist you further, could you kindly provide additional information about the setup of the ParticleSystem prefab? Specifically, I would like to know if you have set the "Stop Action" property to "Destroy" under the ParticleSystem component properties. It should not be set to "Destroy". If this property isn't responsible, please let me know if there are any custom scripts attached to the prefab that might trigger its destruction under specific conditions.

    I also wanted to mention that the pooling system utilized by the water script doesn't destroy particles once they finish playing; instead, it disables them for future reuse. Therefore, it's possible that either the "Stop Action" property or an attached component to the particle prefab is causing the destruction of the particle game object, and hence the error you're experiencing.

    I look forward to your response :)
     
  41. chaosmonger

    chaosmonger

    Joined:
    Jan 23, 2019
    Posts:
    71
    Thanks for your reply. The particle system I'm instantiating have "None" to "Stop Action", but there was indeed a script clearing the particle... And now I removed it. So maybe that was the issue. I'll do more testing and let you know if I've it again! Thanks a lot.
     
    HaydeLudos likes this.
  42. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Exactly, the script that was destroying the particle game object seems to be the issue. In this case, you don't need to manually clear the particle game objects yourself. The water system already takes care of this by deactivating the particle system upon completion and activating it again when needed. The pooling system ensures that no destruction occurs, which is the essence of its functionality.

    Thank you for removing the script, and I'm glad we identified the potential cause of the issue. Please continue with your testing, and if you encounter any further problems or have additional questions, don't hesitate to let me know. I'm here to assist you. Thanks a lot for your cooperation! :)
     
  43. Vauxvogh

    Vauxvogh

    Joined:
    Nov 29, 2017
    Posts:
    10
    Hello! I emailed you a bit back, not sure if you got it but I was inquiring about your sine waves, how would I make rigid bodies float more dynamically with the waves? When I increase the wave height the rigid body seems to only float up to a certain height before it just floats through the wave and the same when going down the wave it only goes so low before it looks like its just floating in air. Its not following the water line all the way. Why does it do this and what could I adjust? For example just try these sine wave settings and you'll see what I mean, and leave the rest of the water settings the default that you have it in the demo scene of large water.

    (For 3 waves in the sine waves list)
    Amplitude 5, 3, 4
    length, 40, 30, 25
    Velocity, 5, 5, 5
    offset, 0, 0 ,0

    Thanks Man!
     
  44. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,
    Actually, I replied to your email one day after I received it. Please verify your inbox :)
     
  45. Vauxvogh

    Vauxvogh

    Joined:
    Nov 29, 2017
    Posts:
    10
    Hello, Thank you but it doesn't look like I received it,
    what email did you send it to? Could you resend it
     
  46. Vauxland

    Vauxland

    Joined:
    Mar 27, 2023
    Posts:
    1
    Hey did you resend it by chance?
     
  47. HaydeLudos

    HaydeLudos

    Joined:
    May 2, 2018
    Posts:
    39
    Hello,

    I have replied again to the email "v*****gh[@]yahoo.com"
     
  48. wrt0302

    wrt0302

    Joined:
    May 8, 2020
    Posts:
    1
    Hello,

    I sent you an email with a question about the buoyancy and drag of liquids in your assets.
    I know it's been a while, but when are you going to answer it?
     
  49. unity_2CFCB6343F34D9401808

    unity_2CFCB6343F34D9401808

    Joined:
    Oct 18, 2022
    Posts:
    1
    Hi there,
    We just bought your 2D water asset kit and it is working fine.
    We want to use it on our 2.5D game but unfortunately we encountered an issue where rotating the water's gameObject transform caused refraction and other features not to work.

    Do you have an alternative or solution for this?
     
  50. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    40
    Hey, does this work on Unity 2023.2?