0
Declined

Named raycasts

Elvisish 2 years ago updated 2 years ago 2

I'd love to be able to name raycasts so the c# conversion is easier to differentiate:

RaycastHit hitInfo1 = default(RaycastHit);
        var raycast1
Bolt Version:
2.0.0a10
Unity Version:
2019.3.6f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2
Declined

Hi Elvishish,

Unfortunately naming generated C# identifiers for unit outputs is not possible.

You could however store your raycast hit result in a named Graph Variable, then refer to that graph variable instead later on, for clarity.

Thanks, is there a reason why raycasts can't be named? It's obviously only really important for c# readability, particularly when the actual raycast takes place.