Getting a reference to an instance of BP class in function library c++

Decided to rewrite some bottlenecks of my project in C++ using Function Library. Getting simple variables of standard types is not a problem. But to get a specific instance of the widget(made on Blueprint) that does not. Tell me how to implement access to variables and classes used in Blueprints using function library c++. Also from global issues gaining access to gamestars and gamemode implemented on BP from C++.
sorry my bad eng.

As far as I know any blueprints you create in the editor can not be referenced in C++. You will have to create or find the functionality you want to reference inside your C++ library, in the C++ source code.
This means: if you want to reference a Blueprint, you will have to use a C++ parent class, and thus have only access to the functionality of that class. At least inside you BP function. However you could pass the parent class reference out of the C++ function, and cast it to the needed BP reference inside another blueprint.

If you want to reference something in C++ you will have to write C++ source code. You can not reference blueprint-only classes or variables in C++.

I have now GameInstance class implemented on BP, it contains links to almost all game classes and structures of my game. If I remake Game Instance’class in C++ . Will it help me to access my variables and classes implemented in BP?

I’m using a DataTable to store all my assets references, BPs, materials, etc.
And I’m also storing this DB in the GameInstance.

And I’m getting access to the DB blueprint with:

static ConstructorHelpers::FObjectFinder<UDataTable>GlobalDataTableAsset(TEXT("/Game/Blueprints/Data/GlobalData_DT"));

GlobalDataTable = GlobalDataTableAsset.Object;

Not sure if that was your question tho lol, my english is also quite limited

Oh also you need to declare your struct like this :

    struct FGlobalData : public FTableRowBase

“public FTableRowBase” allows you to create an editor DataTable asset from this struct type