Cant get EditInline to work

Hello, im trying to do a modular weapon system where it has subobjects that are used for the firing logic and zooming, and i want those to be editable from the properties, in UDK it worked with editinline in the properties and editinlinenew in the class declaration of my subobject, and i could create the instance of the object from the green arrow in the properties.
I cant get it to work on UE4, ive added editinlinenew to the class parameters in my UObject and then set the variable in my weapon like this :

   UPROPERTY(EditDefaultsOnly,EditInline ,Category=Firing)
    	UFireMode * CurrentFiremode;

It would work by not using the Editinline keywork perfectly fine. but i really want to be able to create the object from the properties, as if not, it clutters the blueprints by a lot. Ive tried spawning that variable in the default properties function with NewObject function, and it shows the variables of the object in the properties, but i cant create, delete, or change its class, wich is what i need.

Hi Victor,

If you just want to be able to choose what type UFireMode is in the Default Properties, you can make an EditInline (or EditAnywhere) variable that represents the class you want UFireMode to be, and then spawn an instance of that class at runtime in C++.

You can see an example of this in Pawn.h, with the variable AIControllerClass

/** default class to use when pawn is controlled by AI. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=AI)
TSubclassOf  AIControllerClass;

Then the actual AIController* is assigned to when the object is created:

if ( AIControllerClass != NULL )
{
	FActorSpawnParameters SpawnInfo;
	SpawnInfo.Instigator = Instigator;
	SpawnInfo.bNoCollisionFail = true;
	SpawnInfo.OverrideLevel = GetLevel();
	Controller = GetWorld()->SpawnActor( AIControllerClass, GetActorLocation(), GetActorRotation(), SpawnInfo );
	if ( Controller != NULL )
	{
		Controller->Possess( this );
	}
}

Hi Victor,

Just to be clear, are you trying to edit from within the Blueprint, or from the Details panel of the actor placed in the level?

Either way, try using just EditAnywhere and let us know if that gives you the result you desire.

Cheers!

I was trying to edit it from the blueprint, as EditDefaultsOnly, im going to test with EditAnywhere

Imgur

This is what i get with editAnywhere, exactly the same i got with EditDefaultsOnly, i dont initialize it in properties. If i initialize it in properties like CurrentFiremode = NewObject(GetTransientPackage(),UFireMode::StaticClass());
I only get the values, but cant create a new one or change the class of the current one