You can now get the Remote Debug tool on the asset store! Editing live on the device has never been easier, for fast iteration time and the ultimate in “what you see is what you get”. For more info check out this video, the forum thread or just read some of the other entries on this… Read more »
Posts Categorized: Code
Hdg Remote Debug – How It Works
Hdg Remote Debug works using .NET’s reflection features; it doesn’t use any sort of built-in Unity serialisation. Every second it gathers all GameObjects that are currently active, finds all Components on them, and for each component, uses reflection to find all serialised and public fields. This data is sent back to the client running in… Read more »
Remote debug / live update of Unity builds on device
Unity has a feature called the Unity Remote which is an app that you run on an Android or iOS device. The editor talks to this app via USB and sends the render output of the game as it is running in the editor to the device. The touch inputs from the device along with… Read more »
Visual Studio shader syntax highlighting part 2
I have updated the NShader syntax highlighter to allow adding extra extensions dynamically via the Visual Studio settings. This is one of the most requested features, and it really is a feature that makes sense. The plugin was previously hard-coded to specific file extensions. The reason for this is because that’s just the way you… Read more »
Ring buffers / circular buffers
A ring buffer, also known as a circular buffer or cyclic buffer, is a very useful data structure for certain situations, and worth having around in your programmer’s toolchest. It’s a fixed-size buffer but treated as though it’s connected end to end (that is, the end is connected to the start) and data is written… Read more »
The case of the continually checked out prefabs
I’ve been helping out my friends over at Three Phase Interactive on their game Defect: Spaceship Destruction Kit a little bit. The game is being developed in Unity, and they’re using Perforce for source control. We’re using different combinations of the built-in Unity Perforce support and the P4Connect plugin. We’ve had a strange issue in Unity for… Read more »
Shader syntax highlighting in Visual Studio 2013
If you edit shader code in Visual Studio 2013, you might like to use NShader to get syntax highlighting. NShader was originally written by Alexandre Mutel. His version is available here but it only supports VS2008, VS2010, and VS2012. Issam Khalil had forked it and added VS2013 support, as well as Unity shader highlighting. I’ve… Read more »
BinaryFormatter on iOS
If you’re trying to use a BinaryFormatter under iOS you may discover that it doesn’t work. You may get exceptions like “ExecutionEngineException: Attempting to JIT compile method ..”. This is because by default the mono BinaryFormatter uses runtime generated class serializers. This won’t work on iOS because JIT compilation is not permitted. To get around… Read more »
EditorWindow and play mode
If you’re trying to write custom editors in Unity you may run into a snag. I just spent several hours hitting my head against a wall trying to solve this issue. When you enter play mode, Unity will reload all mono assemblies. This means that your EditorWindow object is recreated, and you will need to… Read more »
Unity performance and empty functions
We’re busy here at Horse Drawn HQ working on our first mobile and tablet game. We’ve still got a bit of a way to go, but I thought I’d do some profiling of our game on my iPhone 4 using Unity’s built-in profiler to see where we were at. I was surprised to see an… Read more »