vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
470 stars 50 forks source link

Expose exported Method and Parameter names in UdonSharpProgramAsset #22

Open CyanLaser opened 2 years ago

CyanLaser commented 2 years ago

Feature Description: Please expose the public methods with variable names for the parameters and return value as well as property names so that editor scripts can access this information. Field Definitions are already exposed in UdonSharpProgramAsset and a similar dictionary for methods and properties would be sufficient solution.

For context on why I would like this feature, my goal is to build support into CyanTrigger to easily work with U# programs.

CyanLaser commented 2 years ago

For clarification on this request, here is the information I would like for each public method in an UdonSharp program:

For each parameter:

Method output should be separated from the parameter list but with the same information.

Properties could be added to the list of all methods or added to their own list as they seem to be treated the same as methods when compiled.

The next version of CyanTrigger has everything implemented for the UI and compilation to support a simple version of calling into these methods but now only needs the information specifically from UdonSharp programs.