This is due to the fact that the reference variable does not initially point to a specific object of the specified class, but only allocates space for its storage in RAM. As you can see, the default value is none.
If the variable is inside an actor, and its type is also an actor (or a child class of an actor), then you can set the value by selecting a specific actor in the viewport using the detail panel by clicking on the actor.
By first setting the Instance Editable flag on the variable.
About setting the default value for ref variable . After I created the ref variable and type = new blueprint 1 I placed a cube in the viewport and tried to set the default value but the combo box is disabled and also the arrow for “select actor in the view port” does nothing so what is wrong here ?
You need to pull out to the level the actor IN WHICH you want to set the value, and the one TO WHICH you want to refer.
You can set the default value only for those actors who are on the level (if we are talking about hard references (blue)).
They differ in that the hard reference will change value when the object is deleted (the value will become None (nullptr)), but soft references continue to save the path to the object, and when it is loaded again, you can access it again using the old reference.
Hard references also ensure that the object they refer to will be in memory, and if necessary, Unreal will load it automatically, IF this is possible.
But for actors this is NOT possible, since their load is controlled by the level. When a level is loaded, all the actors on it are loaded.
Also, you will not be able to select an actor located on another sublevel using a hard reference. Because a situation may occur when the level is unloaded and the hard refrence is reset.
At runtime you can set the value via Get Actor of Class, but if the sublevel is unloaded, reference will be reset.