Download

Exposing float curves to the detail panel in blueprint.

hi! I want to make a float curve editable from the blueprint I use it in. instead of having to make it a separate asset and openning it in a separate window.

lets me show you what I mean by that. Sans titre.png

I want this for my custom vehicle class, there is several curves for the setup and doing this would mean I do not need to create 4 or 5 float curves in the content browser for every single car I make using my custom class. Anyone knows how to do this?

come on, someone has to know :stuck_out_tongue:

I use them a lot; the struct is called FRuntimeFloatCurve , I had to lurk inside vehicle class to find them.

Sweet! some progress. Now how do I create one? There is only 3 types of curves I can create in the content browser.

UPROPERTY(EditAnywhere)
FRuntimeFloatCurve myCurvePanel;

And then that panel you show up on details panel; that’s C++ only.

oh, so there is no way of doing this from blueprint? :frowning:

hey, im re-doing the class in c++, is there any way of setting keys in c++ or do I need to create a curve in the editor and asign it as the selected external curve?

Hi all,
I want to know how to draw the red curve like the screenshot above.
FRuntimeFloatCurve can create a graph but it does not contain a editable curves.
Thanks.

Do you still need C++ for this, or has anyone figured out a Blueprint only solution yet?

@eobet Add a RuntimeFloatCurve as a variable to the blueprint. You can see and modify the curve in the default values.

@ThiloN1987 that’s so cool, thank you!

Dayamn, you got my hopes up. You can see and modify the curve yes, but unfortunately you can’t do anything with the variable (can’t get the curve values):

rfc.jpg

Maybe with a bit of C++ in a C++ Blueprint Function Library (did not test it in a packaged game):



// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
*
*/
UCLASS()
class GAMEPLAYABILITYTEST_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

public:
UFUNCTION(BlueprintCallable)
static float GetRuntimeFloatCurveValue(const FRuntimeFloatCurve& Curve, float Time);
};