virtual methods in modules

Xavier Long 3 weeks ago in Melee updated 3 weeks ago 0

What we need:

It seems all the core modules for Game Creator are very closed and not open to being modified or extended outside of directly modifying the code.

I'm requesting that updates be made, especially to the inventory, melee, and shooter modules to have more virtual methods so we can do proper overrides without violating the core code, as well as either public or protected variables for inheritance. 

it would really make the whole system more accessible to more advanced developers and not just beginners. 


As a matter of fact, this will do nothing but increase the number of module customizations we already have and increase what CG can do. Everyone would benefit from just a few more public vars and virtual methods. 

The other important benefit is that it will be less likely that people will distribute large chunks of the source code. Take this for example This Melee Upgrade by Mathalous

Though it's very useful and helps the community, there's no reason he should have to distribute the entire CharacterMelee.cs file among others. If the proper inheritance was set up from the get-go this wouldn't happen.

So ironically by keeping these classes so protected, we have a situation where the code is more open than ever via the distribution of modified files. 

I was able to create a new account, no invoice association of any kind, and download these files scott free.

Please please consider it. This asset suite is fantastic but SO SO restrictive. 


Specifically, I'm working on extending CharacterMelee right now, and it's impossible.

Cant override any methods, gotta basically copy and paste the entire definition but then I can't even access any properties. Everything is set to private, it would help if they were at least set to protected so children who inherit can access these properties. 

I've tried doing work on Inventory before with some of the same issues. But if at least we could make the methods in CharacterMelee to be virtual, and set the variables to be protected instead of private that would take almost zero effort and would help immensely with customizations. Please.

Unity version:
Game Creator version: