0
Answered

C# scripting

Gm1986 3 years ago updated by Evynner Evyste Everistus 3 years ago 15

Hope I don't repeat something that is already answer in another topic. Try to find it but did not.

Hope that it will sound too silly or stupid.

Does Bolt can generate C# scripting and vice versa read a C# script and put it in visual scripting like these plugins, Nottorus does Nodus will soon.

http://nottorus.net/viewpage.php?page_id=1

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

Answer

Answer
Under Review

William's approach is right; any method or property you define in your codebase is accessible as a unit in Bolt.

However, Bolt cannot:

  • Generate C# files from a graph
  • Parse C# files to generate a graph

Not sound too silly doh

+2

Hey GM1986. Bolt does not currently support converting your nodes into C#. Lazlo the developer may or may not add that later. 

The good news, you can take a C# script you create or have and turn those into nodes/units for use in Bolt + any asset you have or buy you can have almost all of those turned into nodes/units as well. If you have not done so yet, read through all his excellent documentation and church out here in particular http://support.ludiq.io/topics/223-custom-types/ as well as here http://support.ludiq.io/topics/222-compare-visual-scripting-tools-for-unity/  I would also encourage you to read every post, not that many yet and all have very good questions and answers. 

Thank You William for the fast answer. Ah at least there is the possibility to turn C# script it is already nice.

The way he has programmed Bolt and the methods used may mean you should not have any need to convert anything created in Bolt to C# anyway but Lazlo I'm sure can give you a more detailed response. 

Thank you William.. this is what i'm looking for

Ok, I did not know that. How do I then convert a C# script into units?

Take a look at the 1st link I posted for GM1986. I believe for just scripts, they may have to be added under type in Tools/Luduiq/Project settings. I have had some assets and scripts just appear in Fuzzy, sometimes you need to look in the codebase to see some assets or know specifically what to type when doing a search. And you may need to run setup again if needed when adding your own or looking for an asset you imported.

´That did not answer my question.. Why not just say how  you make a script turn into units. or do you just mean a that scripts are accessible from units.

I thought, that I can import a script and it appears and units / nodes on a Bolt graph.


+3

Maybe this will help.

Simple script I wrote.



After compile, search for the Script name.



Here you can see all the nodes that can be created when I click on the upper level Nav_Move script.



And here you see all the relevant nodes from the script.


Your scripts should appear in the Finder after compile. Hope that helps.

If it's not generating any C#, how is it handling AOT platforms then? This is assuming that the reflection it's using is Reflection.Emit, which is JIT

Joseph, take a look here. http://support.ludiq.io/topics/161-building-for-aot-platforms/. No doubt Lazlo can give you a more detailed answer.

Answer
Under Review

William's approach is right; any method or property you define in your codebase is accessible as a unit in Bolt.

However, Bolt cannot:

  • Generate C# files from a graph
  • Parse C# files to generate a graph
+2

Thank You Lazlo, but it could be nice if bolt could do so like Nottorus do and Nodus will do.