MerlinVR / UdonSharp

An experimental compiler for compiling C# to Udon assembly
MIT License
669 stars 88 forks source link

Static method and variable support on UdonSharpBehaviours and imported user types #108

Open MerlinVR opened 3 years ago

MerlinVR commented 3 years ago

Link all static variables into a global memory space and generate the linkages to the correct parts of the memory space after all programs have been emitted.

Static methods just work via pulling them in via referenced methods from the root UdonSharpBehaviour methods.

MerlinVR commented 3 years ago

Currently working on linking static methods as this will be used in lieu of manually generating bound expressions for more complex internal structures and expressions. Specifically on the road to #104 , GetComponent(s)\<T> on UdonSharpBehaviours will be represented as an internal method that gets imported when used.

MerlinVR commented 3 years ago

Update: static methods functional.