I’ve not tried to set a raw pointer this way, but I’ve had some success with setter functions.
You could try:
UFUNCTION(BlueprintCallable, Category="UnitManager")
void SetUnitManager(AUnitManager* _MgrPtr) { MgrPt = _MgrPtr;}
Then you should be able to call this on the actor and set it. Might need a corresponding getter on your other actor to grab the AUnitManager pointer.