zz-roba / UdonPieCompiler

UdonPie Compiler translates UdonPie code into Udon Assembly.
MIT License
38 stars 4 forks source link

Latest version of compiler does not allow you to declare custom events #6

Closed Foorack closed 4 years ago

Foorack commented 4 years ago

Problem

Latest version of the compiler introduced a bug making you unable to introduce your own custom events. You can still have custom functions, this is specifically impacting only functions who's name start with an underscore. This was possible in older versions, but broke a couple of days ago. Not being able to define custom events prevents the UdonPie script from being called by another Udon graph.

Edit: This seems to be related to commit 914f9d9617bdcda149d03e73e806ae46d7af709b

Example

from Udon_classes import * # IGNORE_LINE # pylint: disable=unused-wildcard-import

def _custom():
  UnityEngineDebug.Log(SystemObject("Hello"))

Running this through the compiler simply prints "_custom" and then exits. It does not produce any Uasm.

Foorack commented 4 years ago

Looking into it to see if an easy is possible.