Currently i use this code:
const FString command = FString::Printf(TEXT("FunctionName %s"), *SpawnedActor->BlueprintConfig.Texture2D);
FOutputDeviceDebug debug;
BlueprintObjectPointer->CallFunctionByNameWithArguments(*command, debug, this, true);
to call blueprint functions and i use the %s etc… to pass through parameters and it works fine, is there a way for me to pass through UTexture2D? or UObject? like this… %UObject.
I’ve found a solution, i just used this code from rama’s plugin, to pass through the path as a string and load the object within the blueprint.
UObject* UVictoryBPFunctionLibrary::LoadObjectFromAssetPath(TSubclassOf<UObject> ObjectClass,FName Path,bool& IsValid)
{
IsValid = false;
if(Path == NAME_None) return NULL;
//~~~~~~~~~~~~~~~~~~~~~
UObject* LoadedObj = StaticLoadObject( ObjectClass, NULL,*Path.ToString());
IsValid = LoadedObj != nullptr;
return LoadedObj;
}