Either your BlueprintMenuWidget has to have a reference to your CodedActor, or the other way around. If you have this reference in Blueprint (or pointer in C++) you can access all of the (public) members of the object.
So lets say you have a reference to your CodedActor in you BlueprintMenuWidget. You could do this by having the Actor create the widget. This ways the Actor can set the reference insinde of the Widget.
When the widget wants to access members of the CodedActor (your TArray in this case) it can just do so by using the reference that it has to the actor. If you declare the TArray like this in your actor:
Can you please show the code where you set the LanguageVar? It is going to be null in the beginning, so if you dereference it before you set it you might run into errors. Also: please post the error message you get, or screenshot it so we can see what’s the problem.
I did’t set the LanguageVar. May be there is problem.
Where and how should I set it?
Error Blueprint Runtime Error: Accessed None trying to read property LanguageVar from function: ‘ExecuteUbergraph_MainMenu’ from node: Print String in graph: EventGraph in object: MainMenu with description: Accessed None trying to read property LanguageVar
You need a C++ class that derives from Widget, lets call it BlueprintMenuWidgetBase. Your BlueprintMenuWidget then needs to derive from BlueprintMenuWidgetBase, instead of Widget. You have to mark BlueprintMenuWidgetBase with UCLASS(Blueprintable) in order for that to work.
Lines 6 - 8 should go in BlueprintMenuWidgetBase, and then you should be fine.
Your explanation is clear.
However…
It’s strange… I have a clear VS. It looks lile engine problems.
I created new C++ class MyWidgetBlueprint that derives from WidgetBlueprint.
It’s finished with error and ask recompile the project.