Posts Tagged api

Hiding Unity Library Internals

Tags: , , ,

When writing code for a library, there is invariably some of it you want to hide from the users of the library. You want to keep the public API clean, but Unity makes this tough. Today’s article discusses a strategy for laying out your code so that users of the library aren’t burdened by classes, functions, and properties that they don’t need to know about. Read on to see how!

Read the rest of this article »

No Comments

Moving Methods out of Classes

Tags: , ,

In today’s article I’ll share a technique that can help you reason about your classes (and structs). The core idea is to move some methods out of the class into helper functions. Doing this can really simplify the class and simplify the functions so they’re much more easily understood by readers (including yourself!), more easily written, and more easily extended. Read on to learn more about this technique!

Read the rest of this article »

No Comments

Simple Plugin System

Tags: , ,

Sizable applications are often in need of externalizing code from the main application. Often times this is done via a library or framework and it is well understood in the Flash community how to use these in our applications. What is less-understood is how we can go about delegating some parts of our applications to plugins. Read on for a simple technique to get plugins into your Flash application.

Read the rest of this article »

16 Comments