Forum

VL: AStar Pathfinding Nuget

vl

#1

Hi. Do you know how to deal with it? I tried to import .NET nuget AStarLite and as input it receive an array of two-dimensional byte array, but how to provide this in VL?
Screenshot_16


#2

hi yar, you can set a reference to mscorelib.dll (Add .NET Framework Assembly) and use the native operations of System.Array like this:

image

in the end use a CastAs to cast to the two dimensional array type. didn’t test it, hope it works…


#4

@tonfilm Thanks! It seems to be working fine. I’ll try to dig deeper.
What is .NET Framework Assebmly and what I did add to VL? Why so many new nodes?

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

And another question: how to create two-dimensional byte array filled with specific values? And how to handle this array as in “for each” region?


#5

the .NET framework is the software runtime we use to run VL. it is created by micorsoft and has a huge library. mscorelib.dll is the core library of the .NET framework with all basic functionality to build more complex software. basically what VL.CoreLib is for VL.

since VL can use any .NET library as node you just added all things defined in mscorelib.dll to your vl document:
https://referencesource.microsoft.com/#mscorlib,namespaces

you would basically make two Repeat regions with the same iteration counts as the array dimensions and then have a logic to set the individual values by the given index of the Repeat region.
that’s why i put the SetValue with Index 1 and Index 2 there, as an example to set the first value of the 2d array to a byte with value 0.

does that make sense to you?


#6

@tonfilm thanks again!
It is very useful and explains a lot.


#7

What happened at the end:

Video: https://youtu.be/Rclw1jwFCek

Files: AstarVL.zip (15.9 KB)


#8

pretty cool! thanks for the video.