Posts Tagged unity engine

Unit Testing Code That Uses the Unity Engine: Part 2

Tags: , , , , ,

Last week’s article showed a technique that you can use to abstract the Unity engine so that you can test code that uses it. Today’s article presents another technique that allows you to remove this abstraction layer so your game code is faster and more natural. Read on to learn how!

Read the rest of this article »

No Comments

Unit Testing Code That Uses the Unity Engine: Part 1

Tags: , , , ,

How do you write unit tests for code that uses the Unity engine to play sounds, make web calls, or render graphics? Today’s article shows one solution!

Read the rest of this article »

No Comments

How to Detect If the Unity Engine Is Available

Tags: , ,

Sometimes we write code that’s meant to be run outside of the Unity engine. This could be anything from unit tests being run in MonoDevelop or Visual Studio to shared code that’s used on a multiplayer server. Regardless, the Unity engine isn’t available for use unless you’re running in the editor or a deployed build. This means you’ll have problems whenever you access the Unity engine via Debug.Log, GameObject, or MonoBehaviour. Today’s article shares some quick tips that enable you to tweak your code so that you can detect whether the Unity engine is available for use. Read on to learn how!

Read the rest of this article »

2 Comments