Classes extending Object & Node now need to be partial classes? #5431
Replies: 1 comment 2 replies
-
Basically there are code-generators in place now which automatically does some boiler plate for us. For example. I have a Custom class like Player and want to expose a field "MaximumHealth". I can do that with writing [Export] on top of the field. The code generator will now put an extra file into more or less hidden directoy of the project, which contains the serialisazion information, which is good, because we don't want to clutter our file with generated code. In this File is the same class Player as in ours. It is indeed just another half of our class, but when one file containing parts of the class has a partial keyword, every parts must have it. The only downside about that is, that your class contains methods, that you didn't put in there, but those are system internal and shouldn't be used by you anyway. Inheriting such a class works the same. Virtual functions and overriding functions within a partial class works also as usual. |
Beta Was this translation helpful? Give feedback.
-
Just trying out the new 4.0beta1 mono build. I'm wondering what fueled this change and what kind of effect this will have on class design and functionality, as I had no problem with normal inheritance in 3.5. Does it work similarly? It seems like virtual/overriding still works syntactically. I'd test it myself but I'm having a lot of trouble getting the vs solution to work at the moment.
Beta Was this translation helpful? Give feedback.
All reactions