Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Fluid 6.5.4 installation issues
#1
I'm using Unity 2022.3.32f1 and a new empty 3D project (built-in render pipeline). I import Obi Fluid 6.5.4 using the project manager and get the following update warnings:

   

I have to choose 'yes' to stop this warning being shown repeatedly.

At this stage, Obi Fluid and the sample scenes seem to work ok, however Force Zones do not work (e.g. in the 'SimpleFluid' demo scene).

If I select a gameobject with an Obi Solver component, I can see the "The Burst backend depends on the following packages: " warning. I install the Mathematics, Collections and Jobs packages (using 'Add packages by git URL...' for com.unity.jobs) - Burst seems to already be in the package list:

   

Upon adding the Collections package, I get the following persistent error and I can't enter play mode anymore:

Code:
Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(74,46): error CS1061: 'UnsafeList<K>' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'UnsafeList<K>' could be found (are you missing a using directive or an assembly reference?)


Are there updated installation instructions or what is the correct sequence for setting up the package properly? Thanks
Reply
#2
Hi!
These are multiple unrelated questions so I'll answer them separately:

(06-06-2024, 01:08 PM)Amael Wrote: I'm using Unity 2022.3.32f1 and a new empty 3D project (built-in render pipeline). I import Obi Fluid 6.5.4 using the project manager and get the following update warnings:
I have to choose 'yes' to stop this warning being shown repeatedly.

This is normal Unity behavior: when any of the existing scripts in your project use an API that has newer available alternatives, Unity will offer to automatically update the code to the newer API. This often works fine, so it doesn't matter whether you answer yes or no. In some rare occasions, Unity will botch the update and cause compilation errors after its automatic update attempt. However if you didn't get any, then it's fine.

(06-06-2024, 01:08 PM)Amael Wrote: At this stage, Obi Fluid and the sample scenes seem to work ok, however Force Zones do not work (e.g. in the 'SimpleFluid' demo scene).

Force zones seem to work fine for me in that particular scene. Keep in mind that all external forces acting on fluid are scaled by the fluid's atmospheric drag parameter: if this parameter is zero, the atmosphere surrounding the fluid will have zero effect on it, and so will force zones.

(06-06-2024, 01:08 PM)Amael Wrote: If I select a gameobject with an Obi Solver component, I can see the "The Burst backend depends on the following packages: " warning. I install the Mathematics, Collections and Jobs packages (using 'Add packages by git URL...' for com.unity.jobs) - Burst seems to already be in the package list:

Yes, this is the expected behavior when any of the required packages for the Burst-based backend are missing. See:
http://obi.virtualmethodstudio.com/manua...kends.html

(06-06-2024, 01:08 PM)Amael Wrote: Upon adding the Collections package, I get the following persistent error and I can't enter play mode anymore:

Code:
Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(74,46): error CS1061: 'UnsafeList<K>' does not contain a definition for 'length' and no accessible extension method 'length' accepting a first argument of type 'UnsafeList<K>' could be found (are you missing a using directive or an assembly reference?)

Some versions of Collections use length, and some use Length with capital L. The fix is simple: use an "L" instead of "l" in NativeMultilevelGrid.cs. See:
https://obi.virtualmethodstudio.com/foru...nition+for

An alternative would be to install a newer version of the Collections package.

kind regards,
Reply
#3
Thanks for the detailed reply - changing the case of the 'L' worked, much appreciated!
Reply