Acces bp variable from c++

hi all,

Have come probleme to accesing a bp variable in c++ code .

I have a c++ class : Module with a variable :

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Gameplay)
    		int32 Length;

in the editor i made a blueprint herited from this class.
now i need to get the Length in another class: Map

finding the blueprint and store him :

AMap::AMap(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	static ConstructorHelpers::FObjectFinder<UBlueprint> ModuleBP(TEXT("Blueprint'/Game/module/basic/Module.Module'"));

	if (ModuleBP.Object != NULL)
	{
		Module.Add((UClass*)ModuleBP.Object->GeneratedClass);
	}
}

trying to get the variable :

AModule * child = Cast<AModule>(Module[0]);
    
    		if (child != 0)
    		{
                          //never go here , the cast dont work ?
                          LocationSpawn.X += child->Length;
    		}

what i do wrong ?

Thanks

You putting UClass’es module, which are not AModule relative objects, you need to spawn from UClass first