UdonSharp icon indicating copy to clipboard operation
UdonSharp copied to clipboard

Full inheritance with generics handling

Open MerlinVR opened this issue 2 years ago • 2 comments

Handling for virtual classes and interfaces on UdonSharpBehaviours and imported user classes. Needs to handle generic type uses that implement interfaces as well.

Will be treated as an AOT process where all potentially referenced virtual members of imported user types get emitted into the referencing UdonSharpBehaviour's program, then have vtables generated for that program's context.

  • [x] UdonSharpBehaviour virtual inheritance
  • [ ] UdonSharpBehaviour interfaces
  • [ ] User+UdonSharpBehaviour type checking via is/as
  • [ ] Imported user type virtual inheritance
  • [ ] Imported user type interfaces
  • [ ] Generics handling
  • [ ] Handling for mixed interface usage between imported user types and UdonSharpBehaviours

MerlinVR avatar Aug 13 '21 01:08 MerlinVR

Currently working on just UdonSharpBehaviour virtual inheritance since it needs to be handled when allocating values and addresses for methods in order to allow cheap virtual method calls across behaviours.

MerlinVR avatar Aug 13 '21 01:08 MerlinVR

Update: Virtual inheritance on UdonSharpBehaviours functional. Currently includes inheriting base class members, implementing virtual methods, base calls, calls to virtual method implementations from base class methods.

MerlinVR avatar Aug 30 '21 03:08 MerlinVR