UdonSharp icon indicating copy to clipboard operation
UdonSharp copied to clipboard

Add a method attribute to export private methods for use in SendCustomEventDelayed / SendCustomNetworkEvent

Open TheHelpfulHelper opened this issue 3 years ago • 0 comments

Feature Description: In order for a method/event to be accessible to SendCustomEventDelayed / SendCustomNetworkEvent it needs to be exported. However making it public, means that now all other scripts can also call this method. This makes the intent of the method unclear (Is it just public so you can call it with SCED/SCNE or am I allowed to call it from other scripts as well?). Adding an attribute like that would make it clear that youre not "supposed" to call the method from another script. (Ofcourse you could still call it with SCE from another behaviour, but the main argument is showing use-intent for people using UdonSharp and for Intellisense. sort of like [SerializeField] for variables.)

TheHelpfulHelper avatar Aug 15 '21 13:08 TheHelpfulHelper