Posts Tagged generic

C++ Scripting: Part 7 – MonoBehaviour Messages

Tags: , , , ,

The series continues this week by addressing a pretty important issue. Previously, we were limited to doing all our work in just two C++ functions: PluginMain and PluginUpdate. This isn’t at all the normal way to work in Unity. It’d be a lot more natural to write our code in MonoBehaviour classes. So today we’ll come up with some tricks to allow us to write our MonoBehaviour code in C++ so we are truly scripting in C++.

Read the rest of this article »

No Comments

From AS3 to C#, Part 12: Generics Wrapup and Annotations

Tags: ,

Most of C#’s support for generics was covered in the previous article, but today we’ll wrap it up by discussing covariance and contravariance. We’ll also talk about C#’s support for annotations and compare to what’s available in AS3.

Read the rest of this article »

6 Comments

From AS3 to C#, Part 11: Generic Classes, Interfaces, Methods, and Delegates

Tags: , , , ,

Continuing once again, today we cover an exciting new topic: generics! Have you ever wished your classes could be parameterized with a type like Vector.<Type> is? With C# generics, you can! Even better, you can parameterize your interfaces, methods, and delegates too. Read on to learn how.

Read the rest of this article »

12 Comments