Unity-Technologies / BoatAttack

Demo Project using the Universal RP from Unity3D
Other
2.53k stars 952 forks source link

How to Put Water in Project? #200

Open Mashimaro7 opened 1 month ago

Mashimaro7 commented 1 month ago

Is there no way to just simply install the water script from this repo? I spent a good hour or two trying to figure out how to get it into my project, but i can't. The water is using a script called "Water" but i can't find it anywhere. I literally just want to put the water in my scene, if i drag the whole assets folder in there's a bunch of missing packages and errors, i tried installing them one by one but it's not working out.

Hope someone can help me, i know this package seems long abandoned but it'd be great if there was a way to get the water out of it somehow.

Torgo13 commented 4 weeks ago

The water is now in a separate GitHub repo: https://github.com/Unity-Technologies/boat-attack-water

You can follow this guide to install it into your project: https://docs.unity3d.com/Manual/upm-ui-giturl.html When you enter the GitHub URL, make sure to add .git to the end of it.

The tricky part is finding which version of this package is compatible with your version of Unity. You can specify which branch or tag you want by adding a # to the URL followed by the name of the branch/tag, i.e. https://github.com/Unity-Technologies/boat-attack-water.git#2.0.0-preview.1

If you're using 2021 and earlier, 2.0.0-preview.1 may work best for you. The water mesh has visible gaps in 2.0.0-preview.5. For 2022, use 2.0.0-preview.2 as it added RTHandle support. For Unity 6 or 2023, the rendergraph-U6 branch might work best since it adds RenderGraph support.

To use the water in your project, either find the prefab in the URP Water System package and drag it into your scene, or create a new GameObject and add the Ocean.cs script to it. The name of the package or script may be different depending on what version you're using.

Mashimaro7 commented 4 weeks ago

Thanks for the response! I got it in the project and there's only an ocean script with only a couple options, not all the options like in the boat attack project. I'm using the preview 1, as i'm in 2021.3.38.

I was wanting to use it for a couple lakes i have, is it only for procedural oceans or would it work for lakes?

Thanks!


From: Torgo13 @.> Sent: August 17, 2024 12:43 AM To: Unity-Technologies/BoatAttack @.> Cc: Mashimaro7 @.>; Author @.> Subject: Re: [Unity-Technologies/BoatAttack] How to Put Water in Project? (Issue #200)

The water is now in a separate GitHub repo: https://github.com/Unity-Technologies/boat-attack-water

You can follow this guide to install it into your project: https://docs.unity3d.com/Manual/upm-ui-giturl.html When you enter the GitHub URL, make sure to add .git to the end of it.

The tricky part is finding which version of this package is compatible with your version of Unity. You can specify which branch or tag you want by adding a # to the URL followed by the name of the branch/tag, i.e. https://github.com/Unity-Technologies/boat-attack-water.git#2.0.0-preview.1

If you're using 2021 and earlier, 2.0.0-preview.1 may work best for you. The water mesh has visible gaps in 2.0.0-preview.5. For 2022, use 2.0.0-preview.2 as it added RTHandle support. For Unity 6 or 2023, the rendergraph-U6 branch might work best since it adds RenderGraph support.

To use the water in your project, either find the prefab in the URP Water System package and drag it into your scene, or create a new GameObject and add the Ocean.cs script to it. The name of the package or script may be different depending on what version you're using.

— Reply to this email directly, view it on GitHubhttps://github.com/Unity-Technologies/BoatAttack/issues/200#issuecomment-2294699901, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APG4MUXKJGG3JXR6AEXRI5DZR3WKJAVCNFSM6AAAAABMF265NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUGY4TSOJQGE. You are receiving this because you authored the thread.Message ID: @.***>

Torgo13 commented 4 weeks ago

The options were moved to the Project Settings window in 2.0.0-preview.2, probably to ensure that every Ocean instance uses the same settings. I prefer having them on the MonoBehaviour like in 2.0.0-preview.1 since I only have one instance of the Ocean prefab in my project and I found that made it easier to modify the settings during gameplay.

I'd recommend using 2.0.0-preview.1 and backporting any improvements you need. Since imported git packages are immutable, meaning any changes you make to them won't be permanent, you can either create your own branch and import that or clone it to your project's Packages folder.

I think later versions such as 2.0.0-preview.5 have support for multiple bodies of water, but I haven't tried it myself. Otherwise your best option may be to get a water system from the asset store, although most of them warn that they're too performance-intensive for mobile. A hacky workaround to support lakes in 2.0.0-preview.1 might be to disable the infinite water pass and set the height and render distance of the water manually, as long as you don't mind only one lake being visible at a time.

Mashimaro7 commented 4 weeks ago

Oh okay, well i have a decent water shader, yours was just a bit nicer looking, but i need it for localized bodies of water. Might have a level with ocean where i can use your asset in. Thanks!


From: Torgo13 @.> Sent: August 17, 2024 3:12 AM To: Unity-Technologies/BoatAttack @.> Cc: Mashimaro7 @.>; Author @.> Subject: Re: [Unity-Technologies/BoatAttack] How to Put Water in Project? (Issue #200)

The options were moved to the Project Settings window in 2.0.0-preview.2, probably to ensure that every Ocean instance uses the same settings. I prefer having them on the MonoBehaviour like in 2.0.0-preview.1 since I only have one instance of the Ocean prefab in my project and I found that made it easier to modify the settings during gameplay.

I'd recommend using 2.0.0-preview.1 and backporting any improvements you need. Since imported git packages are immutable, meaning any changes you make to them won't be permanent, you can either create your own branch and import that or clone it to your project's Packages folder.

I think later versions such as 2.0.0-preview.5 have support for multiple bodies of water, but I haven't tried it myself. Otherwise your best option may be to get a water system from the asset store, although most of them warn that they're too performance-intensive for mobile. A hacky workaround to support lakes in 2.0.0-preview.1 might be to disable the infinite water pass and set the height and render distance of the water manually, as long as you don't mind only one lake being visible at a time.

— Reply to this email directly, view it on GitHubhttps://github.com/Unity-Technologies/BoatAttack/issues/200#issuecomment-2294803420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APG4MUWHYO57YWVSOFEGLZ3ZR4HZPAVCNFSM6AAAAABMF265NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUHAYDGNBSGA. You are receiving this because you authored the thread.Message ID: @.***>

Torgo13 commented 4 weeks ago

No need to thank me, I'm just a solo dev using it in my game :) The credit goes to @Verasl, @ellioman and anyone else who have contributed to it.

Mashimaro7 commented 4 weeks ago

Oh haha, i see! Well thanks for the tips anyway!


From: Torgo13 @.> Sent: August 18, 2024 2:32 AM To: Unity-Technologies/BoatAttack @.> Cc: Mashimaro7 @.>; Author @.> Subject: Re: [Unity-Technologies/BoatAttack] How to Put Water in Project? (Issue #200)

No need to thank me, I'm just a solo dev using it in my game :) The credit goes to @Veraslhttps://github.com/Verasl, @elliomanhttps://github.com/ellioman and anyone else who have contributed to it.

— Reply to this email directly, view it on GitHubhttps://github.com/Unity-Technologies/BoatAttack/issues/200#issuecomment-2295177437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APG4MUVY6QP5LJOMQXYYJGTZSBLZVAVCNFSM6AAAAABMF265NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGE3TONBTG4. You are receiving this because you authored the thread.Message ID: @.***>