So I create variable of TSubclassOf
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Shield)
TSubclassOf<UShield> UsingShield;
(UShield - Static mesh component) in character class (will named it class “A” for example). After that I set this variable in blueprint child of class “A” (we will name it class “BP_A”), by BP_Shield (blueprint child of UShield).

After that I print UsingShield class name by function in class “A”
FString ClassName = UsingShield->StaticClass()->GetFName().ToString();
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, ClassName);
and do same thing in class “BP_A”

After that I called both functions from character of class “BP_A” so theoreticaly both functions using same varible, and that what happened.

Why so? What happened? Why it gave two different names?
Not a bug. Simply put,
UClass::GetFName()
and
UKismetSystemLibrary::GetDisplayName(const UObject* object)
(the one you call in the BP) are not the same thing.
In theory, if you change your C++ code to
FString ClassName = UKismetSystemLibrary::GetDisplayName(UsingShield->StaticClass());
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, ClassName);
You should get the same result.
I change code to this
FString ClassName = UKismetSystemLibrary::GetDisplayName(UsingShield->StaticClass());
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, ClassName);
and it got even worse

Wow, that was unexpected… Can you step into the GetDisplayMethod with the debugger to see what the actual object being accessed is?
Unfortunately, I am not very good user of debagger. Can you explain how to do this?
You can enable/disable breakpoints by clicking on the left margin of the code in Visual Studio (where the red circle is)

A red circle means there is a breakpoint, and the execution will pause when it gets there (make sure your configuration is Debug Editor). So place your breakpoint on the line where GetDisplayName gets called, then you can use F10 to advance one line, F11 to step inside the function at the line you are at, Shift+F11 to step out, F5 to continue executing normally.
If it doesn’t work that way, check your Visual Studio shortcuts to see what keys correspond to what debugger actions.
Sorry for so long without response. I did it, and I get a lot of data. But I guess class of UsingShield is “BP_Shield_C”.
P.S. And yes, it still give “class” instead of “BP_Shield_C”.

Ok, silly me, I just realized 2 things:
- First, you are calling StaticClass. That is probably giving you the UClass for UShield, not the actual blueprint object UClass.
- More importantly, in the BluePrint, you are calling GetDisplayName on the UsingShield object, but in C++ you are calling GetDisplayName on the Static UClass of UsingShield.
Try this instead:
FString ClassName = UKismetSystemLibrary::GetDisplayName(UsingShield);
Ok, I just now realized how stupid my mistakes was in the first place. But at least I learned something. And yes it FINALY WORK!

Many thanks for your help 