How to get variable from hitted with raycast object instance?

Anton 8 months ago updated by Nikita 8 months ago 2

1)I have a string.object.varible in my (NPC)game.object prefab
2)In my (Player)game.object flow macro i want to make a raycast to hit NPC in front of me
3)Then i want to get this NPC.instance.string.object.varible and use it in Player flow

I've tried different things, but i just dont understand this simple operation, how?

I tried to do that with custom events, but my Custom event is not even become triggered in NPC.object.instance! ;(

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

custom events helps, just connect it to obj self slot, not argument

maybe gameobj to string will help