The C++ Scripting series continues today by going over some internal improvements that don’t add any features, but make the existing system more robust. We’ve lucked out in a couple of areas and today we’ll take the opportunity to fix them and learn about some inner workings of C++ and C# along the way.
Posts Tagged parameter
We’ve been able to call methods since the very beginning, but we’ve always had to pass all the parameters. Today we’ll add support for default parameters so you can skip them sometimes. There’s a surprising amount of detail involved with this, so read on to learn some caveats of C#, .NET, and C++.
C# APIs are chock-full of generics. Generic types, generic method parameters, generic return types, generic fields, generic properties, deriving from generic types, and generic constructors. We can find all of these in the Unity and .NET APIs. Some are more frequent than others, but we’re going to need support for all of them to make C++ scripting a viable alternative to C#. Today’s article continues the series by adding just that: support for all of these kinds of generics. Let’s dive into how to use them as well as some bonus items added to the project this week.
Sometimes it seems like Unity programming is a minefield. Plenty of innocuous-looking code secretly creates garbage and eventually the GC runs and causes a frame hitch. Today’s article is about some of those less-obvious ways to create garbage.