Cannot save after adding reference to in-game actor in widget BP


As the title says. I cannot save my project after adding a reference to a camera (which is present within the level on play). All I am trying to do is simply set this camera as the new viewtarget when a specific widget is constructed.

This method compiles and saves just fine when executing in the level BP, but causes the following error when used in a widget BP:

“Can’t save …Graph is linked to object World /Game/Maps/MainMenu.MainMenu (ObjectRef) in external map”

In the widget BP I can compile fine, just not save

Why is this happening and how can I get around it? Very new to Unreal in general.
Thanks for your help. :confused:

Am I correct in thinking it was quite a fiddle to get that variable into you widget?.. :wink:

It’s because that kind of variable is reserved for the level BP only.

If you want to get the cine camera in the widget, do

HI @ClockworkOcean and thanks for the quick reply!

Ok ive added in the get “actor of class” however I cant get the specify which camera I wish to use? I see “CineCameraActor” but need CineCameraActor2.

Sorry I probably should have provided more detail. As seen below, the level starts with CineCameraActor as the view target and I am hoping to switch to CineCameraActor2 (a copy of CineCameraActor) with the construction of a widget.

What am I missing, is it just a proper reference? Do I need to cast to the camera first?

Ah, you didn’t say that…

You have to put tags on the camera actors, then you can say ‘get actor of class with tag’

Actor tags is an array in the details. NOT, component tags :wink:

Thanks again for the help!

hmmm ok. Like this? The Camera jumps out to the default postion on widget construction so I dont think I set the tags up correctly. I am a bit confused as I see both Array and Component Tags words in the details panel.

You notice above, I went out of my way to say NOT COMPONENT TAGs :slight_smile:

image

Ah ok, I did say I was very new to Unreal.

THANK YOU!!! :smiley:

For anyone with a similar problem, solution is here:

1 Like

Very good :slight_smile: