Editing Buoyancy Component C++

So I wanted to expose one of the variables in the Buoyancy component (BuoyancyCoefficient) from the Unreal Water Plugin. I went in to the header file of “BuoyancyComponent” made a function
UFUNCTION(BlueprintCallable)
float GetBuoyancyCoefficientValue() const { return BuoyancyData.BuoyancyCoefficienty; }

And here the problems start, I have rebuilt, cleaned, built and restarted and rebooted. But whatever I do I cannot get the function to show up in engine. I have tried to search for it without context as well, but it does not show up. So I then also tried to go into the BuoyancyTypes where the struc that has the value is defined. And I made it UPROPERTY(EditAnywhere) instead of UPROPERTY(EditDefaultsOnly, Category = Buoyancy). But it still does not show in engine. So to last test that I did was that I changed the actual name for the variable (UPROPERTY(EditDefaultsOnly, Category = Buoyancy) float BuoyancyCoefficienty;)). And I renamed it but the renaming does not show in engine. So there seems to be a disconect here for some reason, and I cannot see any reason why. Any idea why this does not show? As far as I can tell this should work.

Hi, while searching online on how to do this exact same thing for the same exact variable I ran into this thread. After many hours of testing and slamming my head against the wall, I noticed that the water plugin c++ code was on the Engine and not on the individual project itself. What is shown in visual studio is just a snapshot, not the actual editable code.
So now I’m going to try this https://m.youtube.com/watch?v=DcEBKnJMxng , and see if it works for me. Hopefully it can help you out also. I might get back to you if I find the time to test this out.

Do note you will need a lot of space, I believe over 200GB and the process takes a few hours.

You could probably just clone the water plugin and just modify it instead of touching the rest of the engine source.

No reason to really touch the rest of the engine source. You could just use the binary version of the engine in this case. Just include the extended water plugin in your own project.

1 Like

Update: It worked for me with the method I stated but it took a long time and sdd space.

I will now try 3dRaven’s advice which sounds way more convenient and less risky than tinkering with Unreal Engine source code.

(post deleted by author)