Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to make water in unity 2019 or 2020

Discussion in 'Scripting' started by Robster95, Nov 3, 2020.

  1. Robster95

    Robster95

    Joined:
    Jul 3, 2019
    Posts:
    90
    I’ve been trying to make a swamp like area in one of my games but haven’t been able to make water at all. All of the tutorials have preinstalled shaders and material or they’re using the unity standard asset pack which doesn’t work due to a compiler error saying something like can’t use GUITEXT anymore due to it not being available anymore (I’m not on my computer right now so I don’t remember exactly what it says).

    Does anyone have any idea or tips on how to make water that the player can walk through and possible make ripples in?
     
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    1,815
    In most cases water is just a simple plane, just like terrain, except that a shader handles transparence, waves, ripples, .. etc. So those shaders are likely exactly what you are looking for.

    Also, there are a ton of different criteria for water. You give next to no information. Water can be anything, from an in-accessible flat blue texture (2D game), to a full physics simulation that wont run in real time. Somewhere inbetween is what you are looking for, but we have no way of knowing what that is.
    So best i can do is tell you "look for an open source tutorial that does what you want, then replicate that".
     
    eses, Olmi and orionsyndrome like this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    11,133
    Most folks would just reach for an asset store product for this. I have not used any of them personally however, so I cannot recommend.

    CORRECTION: I have used one, I think it was called Hard Water and found it quite performant and useful, but it is a simple shader-only solution, so it does not react to you passing through it.
     
    Last edited: Nov 3, 2020
    Robster95 and Joe-Censored like this.
  4. Robster95

    Robster95

    Joined:
    Jul 3, 2019
    Posts:
    90
    Ok i'll look into the shader and see how I feel about it!!
     
  5. Robster95

    Robster95

    Joined:
    Jul 3, 2019
    Posts:
    90
    I'm working on a 3D game where I just want a small part of the map to have water that when the player gets in it slows the player down (easily did that with a ontriggerenter and set the speed to about half). I would have a plane right now that is a trigger so I can walk through it but was not able to find a way to get it to look like water even after downloading a shader on the asset store
     
unityunity