<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title> - Articles</title>
		<description></description>
		<link>http://www.angryant.com</link>
		
			
			<item>
				<title>New Gear</title>
				<description>&lt;p&gt;In 2015 I did a review of my &lt;a href=&quot;https://www.angryant.com/2015/02/26/Trusted-Gear/&quot;&gt;active toolbox&lt;/a&gt;. As obviously a lot has changed since then, particularly with pandemic-mode operations, I figured an update would be appropriate.&lt;/p&gt;

&lt;p&gt;I had hoped to have done a post on a new build agent setup we are working on, but unfortunately JetBrains support are still having some trouble replicating problems we are experiencing with Linux-based TeamCity Unity build agents. You will just have to look forward to that - hopefully not too far into the new year.&lt;/p&gt;

&lt;p&gt;A central theme in the current toolbox is self-hosting and flexibility in general. Third party provided services are great until you get near the edge of intended use cases - which usually works well, but holds the capacity to (hopefully only) slightly frustrate every project flow you go through. We first dipped our toes in self-hosting some services pre-pandemic but since moving to be fully distributed we went all in - to the point of currently only relying on external services for text chat, email, and mobile build distribution.&lt;/p&gt;

&lt;p&gt;That said, I will strive to keep the format of the earlier post - focusing primarily on local machine tools. So as mentioned the update here is flexibility and obviously a use case change as well, given the steep drop in need for working on the go.&lt;/p&gt;

&lt;h2 id=&quot;platform&quot;&gt;Platform&lt;/h2&gt;
&lt;p&gt;The 2013 MacBook Pro got retired - initially in favour of a company workstation at the office and a personal one at home, for once pieced together from parts matching &lt;em&gt;my&lt;/em&gt; needs rather than the sales considerations of a manufacturer of prebuilts. Moving our operations fully distributed, resulting in the company workstation moving in with me, the personal workstation then got converted into a server - replacing the basic Synology box which had previously been sufficient for the limited services we self-hosted when sitting multiple non-family-members in offices were a thing.&lt;/p&gt;

&lt;p&gt;This change of hardware platform obviously meant a move away from macOS - marking the first change in the toolbox. Prior to retiring the laptop I had started dual booting &lt;a href=&quot;https://ubuntu.com/download/desktop&quot;&gt;Ubuntu&lt;/a&gt; on it in order to gauge how far the Linux desktop experience had moved since last I had a look at it. A clear goal in general was an increase in flexibility - not just limited to hardware choice, so if given an actually modern and fully functional desktop experience I was definitely going to prefer Linux over Windows. At the end of my trial run I was satisfied with the experience and had gradually moved to cross-platform software on the macOS installation as well - in order to reduce the number of new things I would need to deal with when jumping completely.&lt;/p&gt;

&lt;p&gt;After landing well on the new platform and properly acclimating I did move around a bit before settling on my current setup, but as a migration point &lt;a href=&quot;https://ubuntu.com/download/desktop&quot;&gt;Ubuntu&lt;/a&gt; (with the default &lt;a href=&quot;https://www.gnome.org/&quot;&gt;GNOME&lt;/a&gt; desktop environment) was excellent. For anyone doing the research today I would recommend trying out &lt;a href=&quot;https://zorin.com/os/&quot;&gt;Zorin OS&lt;/a&gt; as the migration point in stead - regardless of where you consider migrating from.&lt;/p&gt;

&lt;p&gt;I prefer to not use headspace for more tools than necessary, so I opted to use Ubuntu server for our self-hosted efforts - in order to work with the same underlying tooling available in the terminal application of my desktop. The before-mentioned moving around did eventually see me leave Ubuntu for both use cases - in favour of &lt;a href=&quot;https://nixos.org/&quot;&gt;NixOS&lt;/a&gt; as the underlying system, with &lt;a href=&quot;https://kde.org/plasma-desktop/&quot;&gt;Plasma&lt;/a&gt; as the desktop environment on my workstation. Note that while &lt;a href=&quot;https://kde.org/plasma-desktop/&quot;&gt;Plasma&lt;/a&gt; may initially look to be “the Windows experience but on top of Linux”, the primary selling point of the environment is accessible customisation. If I were to describe my current setup in more familiar terms, it would probably be: a macOS-like header bar &amp;amp; launcher, no dock, window auto-tiling, and a functionality-focused high-contrast if dark colour scheme. You can basically adjust it to your hearts content, making it an optimal fit for your particular flow - which is what drew me to it.&lt;/p&gt;

&lt;p&gt;I would not recommend &lt;a href=&quot;https://nixos.org/&quot;&gt;NixOS&lt;/a&gt; as a migration entry point, but long term the paradigm shift is well worth it to me. The advantages are numerous, but personally I am mostly drawn by the declarative OS configuration enabling a single text file to describe a complete system and all of its settings. The flexibility on Linux is great, but just like any other system there are a ton of different locations to review &amp;amp; configure the full experience (Window settings panels meme: Engage!). Having a single file I can use to quickly review what a system is and to modify it is absolutely excellent. It is no animated semi-transparent GUI of smooth loveliness, but I’ll take it.&lt;/p&gt;

&lt;p&gt;For control over hardware resources, service segregation, and advanced tools management I have opted to run a hypervisor on both server and workstation. Aside from massive cloud servers and game consoles, hypervisors are great for configuring and running a number of personal virtual machines on the same hardware - in particular when you have clearly segmented services and goals to work with. From a security standpoint network segregation in this environment is not as solid as with individual machines, given that virtual machine escape exploits are a thing. However neither my private nor our company threat model includes threat actors with the necessary budget and given that the alternative is third party services susceptible to the very same attacks, this configuration is entirely acceptable. This setup means that my day to day desktop experience is actually a virtual machine. Though with a dedicated graphics card and plenty of resources &amp;amp; CPU priority associated that distinction is entirely unnoticeable. In addition to this primary VM, the workstation runs a router for the different VMs, CI agents for the different projects, and other tools like distributed bake &amp;amp; generative services, devkit tools with picky environment requirements, and that sort of thing.&lt;/p&gt;

&lt;p&gt;As an aside, I also ended up running &lt;a href=&quot;https://nixos.org/&quot;&gt;NixOS&lt;/a&gt; on my tablet - though here I opted for &lt;a href=&quot;https://www.gnome.org/&quot;&gt;GNOME&lt;/a&gt; rather than &lt;a href=&quot;https://kde.org/plasma-desktop/&quot;&gt;Plasma&lt;/a&gt; as the desktop experience. While explicitly not designed for touch devices, I find it the better experience of the two on such hardware. In addition to buttery smooth regular reading of books &amp;amp; comics + browsing + media activities, the gaming experience on the tablet is great - using Steam in-home streaming to run games from a VM on the server running an attached dedicated graphics card, with controls either via touch or the excellent Steam Controller. This on a minimum-spec dual-core device with four gigabytes of memory.&lt;/p&gt;

&lt;h2 id=&quot;tracking&quot;&gt;Tracking&lt;/h2&gt;
&lt;p&gt;OmniGroup only develop their software for the fruit company ecosystem, which meant I would of-course have to find an alternative to OmniFocus. Given the difficulty in finding a suitable project &amp;amp; TODO tracking solution described in the last toolbox post, this was by far the toughest workflow change.&lt;/p&gt;

&lt;p&gt;Thankfully our self-hosting journey overlapped nicely with the local toolbox change here as I found an excellent combination of user experience and flexibility in the &lt;a href=&quot;https://www.jetbrains.com/youtrack/&quot;&gt;YouTrack&lt;/a&gt; solution we were already using for company project tracking. While a fully hosted version is available as well, we had already opted for self-hosted in order to more easily run some custom integration with the rest of our flow. The resulting setup is one install for the company, one for the family, and optionally one per project if it involves tightly integrated external parties.&lt;/p&gt;

&lt;p&gt;The underlying data structures can have a whole lot of fields associated with each task/entry - making it a full Jira-like complex beast if that is what you want - or a simple TODO app if that is more your target. Combined with a mobile app and a very flexible system of searches/queries bookmarked or exposed in lists, dashboards, reports, and agile boards, I have found that I can easily tailor an experience to anything from a complex project through small efforts to grocery shopping without slamming into too many walls or facing highly “enterprisey” experiences for very simple use cases.&lt;/p&gt;

&lt;p&gt;For flow integration we use the official &lt;a href=&quot;https://www.nuget.org/packages/YouTrackSharp/&quot;&gt;.net API&lt;/a&gt; - as we as much as possible strive to standardise all our code- &amp;amp; data base to C# and markdown respectively. The experience here has been great as well. We have primarily used the API to update other systems based on changes in tasks, but our wishlist does currently include more bidirectional integration which should be fully supported by the API.&lt;/p&gt;

&lt;p&gt;My calendar is still a central part of my day to day flow - essentially feeding tasks from the tracker through a planning phase and into the calendar. Continuing to use the iCloud calendar setup either through the web app or integrated with a local client is an option, but for forward-looking flexibility and a more stable experience I have opted for a self-hosted solution here as well. A couple of options are available here but probably of most broad appeal would be the CalDav service built into &lt;a href=&quot;https://nextcloud.com/&quot;&gt;Nextcloud&lt;/a&gt;. So long as the service runs https, you can add the account to iOS just fine and on the desktop I have worked with a couple of different options until finally settling on the very lovely, but still-pre-release &lt;a href=&quot;https://apps.kde.org/kalendar/&quot;&gt;Kalendar&lt;/a&gt; project.&lt;/p&gt;

&lt;h2 id=&quot;typing&quot;&gt;Typing&lt;/h2&gt;
&lt;p&gt;Since the last toolbox update the life of this typist has improved significantly. While &lt;a href=&quot;https://www.sublimetext.com/&quot;&gt;Sublime Text&lt;/a&gt; is still great and a very important part of my toolbox, OmniSharp unfortunately did not last as a stable experience. Thankfully &lt;a href=&quot;https://www.jetbrains.com/rider/&quot;&gt;Rider&lt;/a&gt; picked up that slack and then some, offering a rock solid IDE with an extensive suite of tools and of-course neat integration with the other JetBrains products in our arsenal. As a tool for .net and Unity development, &lt;a href=&quot;https://www.jetbrains.com/rider/&quot;&gt;Rider&lt;/a&gt; has been a no-brainer for a while. Praise aside, particularly for our IL patching workflows I am not really satisfied with the assembly/IL browsing functionality of &lt;a href=&quot;https://www.jetbrains.com/rider/&quot;&gt;Rider&lt;/a&gt; when it comes to external assemblies rather than the assembled result of a loaded project. For this need I am still a very happy camper with the &lt;a href=&quot;https://github.com/icsharpcode/AvaloniaILSpy&quot;&gt;Avalonia ILSpy&lt;/a&gt; project.&lt;/p&gt;

&lt;p&gt;Worth noting when speaking of &lt;a href=&quot;https://www.sublimetext.com/&quot;&gt;Sublime Text&lt;/a&gt; is &lt;a href=&quot;https://www.sublimemerge.com/&quot;&gt;Sublime Merge&lt;/a&gt; - another newcomer since last update. While &lt;a href=&quot;https://git-fork.com/&quot;&gt;Fork&lt;/a&gt; is still excellent and would be my first recommendation to anyone, &lt;a href=&quot;https://www.sublimemerge.com/&quot;&gt;Sublime Merge&lt;/a&gt; offers better platform support and an interface striking just the right balance for me between simplification and utility.&lt;/p&gt;

&lt;p&gt;Given that we standardise on markdown as much as possible, expanding the toolbox with a dedicated markdown editor only made sense. While it offers a lot more than just that, [Obsidian][obsidian] is my pick for markdown editing. At time of writing the WYSIWYG editor is very freshly released, but none the less it is my daily driver for the purpose.&lt;/p&gt;

&lt;h2 id=&quot;searching&quot;&gt;Searching&lt;/h2&gt;
&lt;p&gt;Developed specifically for the fruit company ecosystem, &lt;a href=&quot;https://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt; is another previously mentioned tool in need of replacement. Thankfully the developer is very open to clients on other platforms having great access to the largely-community-supplied documentation packages. The consequence is a healthy selection of alternatives, of which I went for &lt;a href=&quot;https://zealdocs.org/&quot;&gt;Zeal&lt;/a&gt;. Available on Linux, macOS, and Windows, this offline documentation viewer is just as excellent a tool to me as &lt;a href=&quot;https://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt; was on macOS.&lt;/p&gt;

&lt;p&gt;I honestly did not really have much use of the editor integration of &lt;a href=&quot;https://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt; in the past, so only having the global shortcut + search tags for accessing &lt;a href=&quot;https://zealdocs.org/&quot;&gt;Zeal&lt;/a&gt; was not a real change for me. Integration may be available, but given the base I was operating on I just did not go looking for it. Thankfully more alternatives are available and perhaps even a fully editor embedded client - in case that is more relevant to you.&lt;/p&gt;

&lt;h2 id=&quot;navigation&quot;&gt;Navigation&lt;/h2&gt;
&lt;p&gt;Before the platform &amp;amp; services shift mentioned throughout this write-up, I decided to complete my workstation ergonomics by looking at peripherals which for some inexplicable reason I had ignored through years of paying attention to desk, lighting, seating, and monitors. Perhaps the reason is that this aspect of ergonomics has an odd air of fringe vs. the other aspects.&lt;/p&gt;

&lt;p&gt;Previously I had been using a flat wireless keyboard with short key travel and a nicely large wireless touchpad. There are a ton of options and semi-religious opinions in this area, but after a while I settled on a vertical wireless mouse (a regular mouse where your hand orientation ends up more vertical than regular horizontal) and a mechanical split keyboard. I found the &lt;a href=&quot;https://www.ergodox.io/&quot;&gt;ErgoDox&lt;/a&gt; open source design very compelling and the number of available options based on it equally so. Aside from being split, the layout is also column stagger rather than the default row stagger - resulting in a more natural primary vertical movement of your fingers rather than constant sideways switching.&lt;/p&gt;

&lt;p&gt;Once I had the board in hand I realised the further room for ergonomic optimisation. Since the available boards implementing the &lt;a href=&quot;https://www.ergodox.io/&quot;&gt;ErgoDox&lt;/a&gt; design are fully customise-able via the &lt;a href=&quot;https://qmk.fm/&quot;&gt;QMK&lt;/a&gt; project, you can use visual editors to redefine key functions as you like or even dive fully into the C-based firmware and write your own custom layout &amp;amp; -functionality there. I used this opportunity to further reduce finger stretch by removing use of some keys entirely and moving other functionality to layers (while not accurate, if you think if the shift key as changing the keyboard layout to a layer of capital letters and different symbols, you have the general idea) - including a numpad and pre-baked shortcut keys like the &lt;code class=&quot;highlighter-rouge&quot;&gt;copy&lt;/code&gt; key you double-tap to &lt;code class=&quot;highlighter-rouge&quot;&gt;cut&lt;/code&gt; or the word left/right keys positioned just above the left/right arrow keys - which again are flanked by the line start/end keys.&lt;/p&gt;

&lt;p&gt;Combining these ergonomic layout optimisations with baked shortcut keys and function keys mapped in &lt;a href=&quot;https://kde.org/plasma-desktop/&quot;&gt;Plasma&lt;/a&gt; to different functionality in different applications (like the macOS shortcut mapping demonstrated in the last toolbox post), my work environment took a significantly step forward on ergonomics, functionality, and sheer accessible speed.&lt;/p&gt;

&lt;p&gt;As a bonus, the &lt;a href=&quot;https://www.ergodox.io/&quot;&gt;ErgoDox&lt;/a&gt; board I opted for came with per-key LED lighting. As I understand it you are supposed to utilise this for fancy animated effects, providing a clear speed &amp;amp; precision boost when gaming - and while I could certainly use both, I opted instead for using it to highlight key functions in the active layer - like a clear inverted T-shape for the arrow keys or a grid for the numpad etc.&lt;/p&gt;

&lt;h2 id=&quot;wrap&quot;&gt;Wrap&lt;/h2&gt;
&lt;p&gt;And that is about it. All these years later I do not have any current conference plans, but my toolbox certainly keeps adapting to my current needs. Overall I feel much more efficient and flexible in my day to day and am happy to have a feeling of being able to do much more with my local and extended environment - to adapt to personal and company needs on any given effort. I hope that this update has helped inspire you - if nothing else then to review &lt;em&gt;your&lt;/em&gt; current toolbox - perhaps to see if anything in there could stand a revisit compared to available alternatives today.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.angryant.com/2015/02/26/Trusted-Gear/&quot;&gt;“Trusted Gear” post&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://ubuntu.com/download/desktop&quot;&gt;Ubuntu desktop&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://zorin.com/os/&quot;&gt;Zorin OS&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://nixos.org/&quot;&gt;NixOS&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://kde.org/plasma-desktop/&quot;&gt;Plasma&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.jetbrains.com/youtrack/&quot;&gt;YouTrack&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.nuget.org/packages/YouTrackSharp/&quot;&gt;YouTrackSharp&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://nextcloud.com/&quot;&gt;Nextcloud&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://apps.kde.org/kalendar/&quot;&gt;Kalendar&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.jetbrains.com/rider/&quot;&gt;Rider&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.sublimetext.com/&quot;&gt;Sublime Text&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/icsharpcode/AvaloniaILSpy&quot;&gt;Avalonia ILSpy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.sublimemerge.com/&quot;&gt;Sublime Merge&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://git-fork.com/&quot;&gt;Fork&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://zealdocs.org/&quot;&gt;Zeal&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.ergodox.io/&quot;&gt;ErgoDox&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://qmk.fm/&quot;&gt;QMK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
				<published>2021-12-30 00:00:00 +0100</published>
				<link>http://www.angryant.com/2021/12/30/New-Gear/</link>
			</item>
			
		
			
			<item>
				<title>Unity, iOS, TeamCity, AppCenter</title>
				<description>&lt;p&gt;You can take the developer out of the tools company, but weaning the developer of tool making is another thing entirely. As per usual, at &lt;a href=&quot;https://framebunker.com&quot;&gt;framebunker&lt;/a&gt; we remain focused on applying tools development where sensible to increase the efficiency multiplier on all efforts involved in development. This of-course includes a continuous integration setup, where we find another JetBrains solution to fitting our needs very nicely: TeamCity.&lt;/p&gt;

&lt;p&gt;Aside from being able to rely on prior experience, we enjoy the flexibility afforded by the solution, suite of available plugins, and direct integration with other parts of our setup. The party trick? Integration in Rider allows not just running of build configurations based on what is already checked in to some branch, but also based on your current local state - for “hey, check this out!” and similar scenarios. Is this offered by other CI setups? Don’t know - probably? Is it cool? Very yes.&lt;/p&gt;

&lt;h2 id=&quot;the-inaudible-x-factor&quot;&gt;The [inaudible] X factor&lt;/h2&gt;

&lt;p&gt;While we find ourselves working in many different environments from time to time, we seem to gravitate towards Unity and iOS. When you add continuous integration to the mix, that means dealing with the Xcode cli for building and signing something actually useful in distribution. And this is where I wrote my TODO on writing this post. If you take a look around the wider interwebs for clues on how this interface works, you will come across a broad range of advice on how such a feat is achieved. All different, most fully correct at time of writing.&lt;/p&gt;

&lt;p&gt;Historically things have changed in this area at least every couple of years which seems to pretty much coincide, with some padding, with how often I need to work with it. So every time I need to set something up, the environment has changed. Obviously underlying technology changes quite naturally over time, but in most cases that does not lead to people also radically changing the interface for said technology - desktop operating systems deal in windows, icons, and cursors, most cars have four wheels and a steering wheel, etc. - even if the technology underlying both has changed quite a bit over the years. Not so in this case. Exaggeration? Probably, but not by a whole lot.&lt;/p&gt;

&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;

&lt;p&gt;Anyway, this is not the prime topic of the post - just part of its inspiration. I wanted to describe the whole flow outlined in the title of this post and provide some insight at each step. Hopefully you will find useful bits here and there even if the whole flow is not relevant to your needs - just as I picked up bits and pieces from other posts as well as the very helpful AppCenter support department (comparatively not a lot of community material out there, given how young the product is).&lt;/p&gt;

&lt;p&gt;Overall the flow goes like this:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;An iOS title is being developed in Unity. For us this means version 2019.4 - the latest LTS release at time of writing.&lt;/li&gt;
  &lt;li&gt;Collaboration happens via git - pushed to and pulled from a local server. Specifics are largely irrelevant to this flow, but in our case we use &lt;a href=&quot;https://gitea.io/&quot;&gt;Gitea&lt;/a&gt; - including its support for git-lfs. Providing related support is an instance of the Unity cache server.&lt;/li&gt;
  &lt;li&gt;TeamCity is connected to the relevant project repositories and some build configurations are set to trigger as soon as fresh commits are detected. Among other things this provides us with up to date builds of the project available for download via the web interface.&lt;/li&gt;
  &lt;li&gt;For iOS builds that is not necessarily all that useful (aside from verifying that things build and pass tests) as you need to run an install flow in order to get on-device testing. Further, everyone relevant for distribution of test builds do not necessarily have access to our build server. So we rely on &lt;a href=&quot;https://appcenter.ms&quot;&gt;AppCenter&lt;/a&gt; (formerly Hockey App - at least this portion of it) to handle distribution of builds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of the above runs in Docker containers on our service network - with the exception of the macOS and Windows build agents which run in VMs on developer machines (enjoying that lovely trend of high core count desktop &lt;a href=&quot;https://www.amd.com/en/products/ryzen-threadripper&quot;&gt;CPUs&lt;/a&gt;). In either case configurations easily transfered to other infrastructure - for example when dealing with client projects.&lt;/p&gt;

&lt;p&gt;And why not do that? All of the above is definitely available for “free” or a minor fee, running on infrastructure maintained by someone else. Mostly flexibility. Running on someone else’s computer is great when you first start it up and everything lines up perfectly with your needs at the time. Reality, that is at least ours, unfortunately rarely remains on static spec - at which point maybe you can upgrade to a different plan or migrate to a different service, but more likely you end up just sucking it up and compromising your needs in order to not rock the service boat. Without spending time on depressing detail we have similarly had bad and potentially disastrous experiences with service operator support quality. Suffice to say I have no plans to again invite a session well past midnight of jumping VPN exit nodes to circumvent overzealous protection schemes while frantically laboring to salvage our data out of the fire of “computer says no”.&lt;/p&gt;

&lt;h2 id=&quot;unity-to-ios&quot;&gt;Unity to iOS&lt;/h2&gt;

&lt;p&gt;Building Unity projects on a CI setup means running the editor via command-line interface - loading the appropriate project in the right import target mode, cache server connected, invoking the appropriate editor script function you write to initiate the build you want, and finally routing output properly back to the CI system. Not a ton of work, but since a “runner” plugin for Unity projects already exists for TeamCity, we decided to not reinvent that particular wheel - relying on this plugin hopefully seeing some support. Our experience with it has unfortunately not been super smooth, so we may revisit that decision in the future.&lt;/p&gt;

&lt;p&gt;A couple of things to keep in mind:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;“Build and run” is what you would usually click in the Unity editor UI in order to end up with Xcode building a nice iOS app for you. Not so when going via Unity build pipeline API. In stead the flow is:
    &lt;ul&gt;
      &lt;li&gt;Build (not run) - this produces an Xcode project for you.&lt;/li&gt;
      &lt;li&gt;Optional modification of the generated Xcode project - utech has &lt;a href=&quot;https://docs.unity3d.com/ScriptReference/iOS.Xcode.PBXProject.html&quot;&gt;a library&lt;/a&gt; available for this.&lt;/li&gt;
      &lt;li&gt;Instruct Xcode to build the generated (and possibly further modified) Xcode project via command-line interface.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;While the build function in your editor script must be static, the class implementing it cannot be. Similarly you should avoid nesting it further than one level in namespacing. Failing any of these will lead to Unity not being able to invoke the function via its command-line parameter.&lt;/li&gt;
  &lt;li&gt;Builds must take place inside one call stack originating in the function invoked via command-line - so being reliant on processes which need to be requested via Unity API before then being collected via an EditorApplication.update invocation or similar, issuing the final build call, is a no-go. This may well be a result of how the TeamCity plugin structures the actual command-line invocation of Unity, which is part of why we have a review of that plugin scheduled.&lt;/li&gt;
  &lt;li&gt;Over a number of Unity updates we have unfortunately seen a loss of some build-related functionality. Our solution has been to patch out these regressions directly in the UnityEditor assemblies, but that may not be an option for everyone. I hope to be sharing that setup and such patches in the not too distant future, but we’re not in a position where work on that front pays the bills - so no timeline promises. Build-relevant issues at time of writing (LTS 2019.4):
    &lt;ul&gt;
      &lt;li&gt;Preprocessing scenes is no longer possible - only postprocessing is.
        &lt;ul&gt;
          &lt;li&gt;Our patch bypasses the scene postprocess setup entirely and invokes our own, with the same sort of attribute markup, as appropriate. Internally it relies on a callback injected before Unity runs its scene processing - thus facilitating preprocessing. I am not aware of a non-patching alternative.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;As promising as it was, the quite new compile pipeline API invokes its events before the produced assemblies are actually moved into place on disk. As a result, any further work on said assemblies is at best not possible (no assemblies there) or at worst defeated (assemblies are modified, only to immediately be overwritten with newly generated copies). Bypassing this issue is further complicated by IL2CPP which makes timing even more critical (no longer a matter of “late enough”, but also “before IL2CPP”).
        &lt;ul&gt;
          &lt;li&gt;Our patch relies on the compiler pipeline API as a source of “what has been built” (usually “everything”, so gains vs. just assuming “all of the assemblies” are minimal), but otherwise completely bypasses it. For playmode patching we just respond to domain unload and for builds a new callback is injected at a point just prior to IL2CPP invocation, when updated assemblies are known to have been written to disk. I am not aware of a non-patching alternative - particularly when IL2CPP is in play.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Aside from patching the Unity editor with these things (and other non-build-related stuff), we really enjoy the advantages of build-time changes to project assemblies afforded us by this post-processing flow. More than just code generation (like generating an enum based on Unity layer names), being able to modify, expand, and contextualise the actual code flow based the complete project - not just based on code structure, but actual usage as dictated by asset data - is quite exhilarating. Anyway, that’s an aside - not really build related. As stated - more on this in a later post (tm).&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We implement the invocation of our Unity build script as one of two build steps (using the Unity plugin) of our TeamCity iOS build configuration. The other is the invocation of the Xcode CLI for building, signing, and packaging the Unity-generated project. This step is configured as the Command Line runner type, with the following “custom script”:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;xcodebuild archive &lt;span class=&quot;nt&quot;&gt;-project&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;output-path/Unity-iPhone.xcodeproj&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-scheme&lt;/span&gt; Unity-iPhone &lt;span class=&quot;nt&quot;&gt;-archivePath&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;output-path/name.xcarchive&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;At time of writing that is really it! If you have worked with the Xcode CLI before or trawled the interwebs in search of this one line, you know how much other work has previously been involved. Fingers crossed that the above remains supported - if not static - for years to come. This of-course assumes that your build agent has already been configured to properly build and sign iOS applications when you invoke manually from the Unity editor UI.&lt;/p&gt;

&lt;p&gt;The result of this step is an xcarchive - almost what we need for distribution.&lt;/p&gt;

&lt;h2 id=&quot;ios-to-appcenter&quot;&gt;iOS to AppCenter&lt;/h2&gt;

&lt;p&gt;Whether you need to iterate with on-device builds or are sharing progress with the team or external groups, you will eventually need to distribute your build. Signing configuration of-course has to be configured via Xcode and associated online services and I am sure it is possible to automate distribution that way as well - ultimately via TestFlight on the client side. However since that route is currently not mandated, we prefer to keep our multi-platform flow joined for as long as possible - hence AppCenter (or, originally HockeyApp - business will business).&lt;/p&gt;

&lt;p&gt;Signing configuration aside, this is our only external service dependency. Given the subject matter, I am inclined to give this one a pass - especially as it means not needing to maintain an additional externally accessible network when distributing to external groups, and the much more manageable hit we would sustain should the service fail us. That said, I am certainly curious about self-hosted options.&lt;/p&gt;

&lt;p&gt;While our iOS build configuration in TeamCity is set to trigger when new changes are detected, distribution is either a manual or scheduled step (“gimme NAO” vs nightly builds). Dependent on the project, several distribution configurations exist - one for each group “team”/”testers”/”this partner”/”that partner” as well as “me”. We rely on the TeamCity build configuration template and parameters features to avoid too much duplication between related, but specialised configurations. In the case of the AppCenter ones a template defines the parameters which it then uses in its “command line” build step, while inherited configurations define different values of those parameters (or use the default). For example, the “me” configuration defines the &lt;code class=&quot;highlighter-rouge&quot;&gt;AppCenterGroup&lt;/code&gt; parameter as &lt;code class=&quot;highlighter-rouge&quot;&gt;Direct-CI-%teamcity.build.triggeredBy.username%&lt;/code&gt;, which the template uses in the “custom script” of its “command line” runner:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;COMMAND&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'appcenter'&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;COMMAND&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$APPCENTER_CLI_INSTALL_PATH$COMMAND&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

zip &lt;span class=&quot;nt&quot;&gt;-ry&lt;/span&gt; Project.%env.BUILD_NUMBER%.zip Payload
&lt;span class=&quot;nb&quot;&gt;mv &lt;/span&gt;Project.%env.BUILD_NUMBER%.zip Payload/Project.%env.BUILD_NUMBER%.ipa
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Starting upload now&quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$COMMAND&lt;/span&gt; distribute release &lt;span class=&quot;nt&quot;&gt;--file&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;%system.teamcity.build.workingDir%/Payload/Project.%env.BUILD_NUMBER%.ipa&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--app&lt;/span&gt; %AppCenterApp% &lt;span class=&quot;nt&quot;&gt;--group&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;%AppCenterGroup%&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--token&lt;/span&gt; %AppCenterToken%
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These configurations are based on the output of the earlier described iOS build configurations. As such they rely on a snapshot dependency from there, with the rule: &lt;code class=&quot;highlighter-rouge&quot;&gt;Project.iOS.*.xcarchive.zip!Products/Applications/**=&amp;gt;Payload/&lt;/code&gt;. This instructs TeamCity to collect the zip of the previously generated xarchive and from it copy out the contents of the &lt;code class=&quot;highlighter-rouge&quot;&gt;Products/Applications&lt;/code&gt; subfolder - into a local &lt;code class=&quot;highlighter-rouge&quot;&gt;Payload&lt;/code&gt; folder. A couple of things to be aware of both in this and how it gets used in the above script:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The choice of the “Payload” folder name is convention. A valid ipa file is a zip archive with the application contained in a subfolder by this name.&lt;/li&gt;
  &lt;li&gt;Moving the zip file into the Payload folder after compression is not related to the upload process at all. In stead, I simply make use of the fact that I have the build configuration artifact dependency configured to “Clean destination paths before downloading artifacts”. So by moving the archive in there I make sure that the build agent clears it along with the uncompressed app when next it runs this configuration. Note that this does not conflict with having the build configuration use the ipa as its artifact.&lt;/li&gt;
  &lt;li&gt;Note that while the earlier script example was cross-platform (aside from Xcode being macOS-only), this is a shell script written for Linux or macOS. Initially I had this be a batch script run on our Windows build agent, but since we wanted the distribution step to always be available (as opposed to whenever a developer machine with a Windows build agent was online) and the Windows environment ironically wasn’t ideal for running this tool, I moved it to an Ubuntu-based Docker [container][&lt;a href=&quot;https://github.com/AngryAnt/teamcity-appcenter-agent-docker&quot;&gt;teamcity-appcenter-agent-docker&lt;/a&gt; which could run along with TeamCity and our other services.&lt;/li&gt;
  &lt;li&gt;While &lt;code class=&quot;highlighter-rouge&quot;&gt;zip&lt;/code&gt; is the program you want for zip compression under Ubuntu, on the Windows 10 command-line, you need to use &lt;code class=&quot;highlighter-rouge&quot;&gt;tar&lt;/code&gt; - which conversely does not produce zip archives on Ubuntu.&lt;/li&gt;
  &lt;li&gt;appcenter-cli does not provide any status output - hence the &lt;code class=&quot;highlighter-rouge&quot;&gt;echo&lt;/code&gt; command. A &lt;code class=&quot;highlighter-rouge&quot;&gt;--debug&lt;/code&gt; flag is available, but turning it on only outputs the REST data sent and received - no additional error information or status reporting results.&lt;/li&gt;
  &lt;li&gt;Not all AppCenter tokens are created equal. Make sure to use &lt;code class=&quot;highlighter-rouge&quot;&gt;appcenter-cli&lt;/code&gt; to create the token eventually supplied to its distribute invocation - tokens created via the web UI are not valid for this use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;build-agent-setup&quot;&gt;Build agent setup&lt;/h3&gt;

&lt;p&gt;As mentioned, while the TeamCity server itself runs in a Docker instance, the build agents performing the brunt of the actual build-related tasks generally run as VMs on developer machines - with the above exception. This gives us much more free hands to configure the build environments for the tasks needing performed - aside from setting up and running the build agent software itself.&lt;/p&gt;

&lt;p&gt;For the AppCenter build agent that means installing &lt;a href=&quot;https://nodejs.org/download/release/v10.23.0/&quot;&gt;nodejs&lt;/a&gt; and the &lt;a href=&quot;https://github.com/Microsoft/appcenter-cli&quot;&gt;appcenter-cli&lt;/a&gt; tool. A couple of notes on that:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;While the appcenter-cli documentation does mention that it requires nodejs 10, that is not a &lt;em&gt;minimum&lt;/em&gt; spec, but an &lt;em&gt;absolute&lt;/em&gt;. Installing latest nodejs and hoping for the best will, at time of writing, only lead to long debugging sessions.&lt;/li&gt;
  &lt;li&gt;When setting up a Windows-based build agent for AppCenter use, you will want to not just install the appcenter-cli node package as a global package, but first modify the nodejs “prefix” from the default location somewhere in the current user path to something global (I go for &lt;code class=&quot;highlighter-rouge&quot;&gt;C:\nodejs&lt;/code&gt;) - ensuring build agent accessibility regardless of its user mode now or later.&lt;/li&gt;
  &lt;li&gt;You may have noticed the &lt;code class=&quot;highlighter-rouge&quot;&gt;APPCENTER_CLI_INSTALL_PATH&lt;/code&gt; variable used in the distribution script. This is just an environment variable set on the build agent - not something specific to TeamCity like the configuration parameters. Not only does this facilitate easy adaptation to different build agents offering the same capability - it is also usable as an agent requirement defined in the TeamCity build configuration. &lt;code class=&quot;highlighter-rouge&quot;&gt;APPCENTER_CLI_INSTALL_PATH&lt;/code&gt; points to where appcenter-cli is installed, so any agent with that environment variable set should be able to run build configurations dependent on that tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For other agents (or the same - if you do not want to run appcenter-cli on unique agents), we just need a licensed Unity install of the appropriate version, the TeamCity agent software, and a Java runtime to run it. macOS agents with iOS-build capability will also need Xcode and its cli installed. Notes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The TeamCity install provides the agent software - just navigating to the agents overview in the web UI provides an install link. Once the agent is up and running (having been authorized by an administrator via the web UI), the TeamCity install takes care of keeping the agent software up to date.&lt;/li&gt;
  &lt;li&gt;While Windows agents get a nice little UI installer, the macOS ones are a bit more manual. Minimal steps to get things going at time of writing are as follows (just pasted from our wiki):
    &lt;ol&gt;
      &lt;li&gt;Unzip &lt;code class=&quot;highlighter-rouge&quot;&gt;buildAgent.zip&lt;/code&gt; file to &lt;code class=&quot;highlighter-rouge&quot;&gt;~/buildAgent&lt;/code&gt;.&lt;/li&gt;
      &lt;li&gt;Configure &lt;code class=&quot;highlighter-rouge&quot;&gt;~/buildAgent/conf/buildAgent.properties&lt;/code&gt;:
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;serverUrl=http\://[DNS-or-IP]\:[PORT]&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;name=[MachineName]-macOS(optionally function and number)&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;workDir=[full user folder path]/buildAgent/work&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;tempDir=[full user folder path]/buildAgent/temp&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;systemDir=[full user folder path]/buildAgent/system&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;env.TEAMCITY_JRE=[full user folder path]/buildAgent/jre&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ownPort=9090&lt;/code&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Create the folder &lt;code class=&quot;highlighter-rouge&quot;&gt;~/buildAgent/logs&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Load the agent for initial connect and auto-upgrade from the server &lt;code class=&quot;highlighter-rouge&quot;&gt;sh buildAgent/bin/mac.launchd.sh load&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;(Administrator authenticates the agent via the web UI)&lt;/li&gt;
      &lt;li&gt;Copy &lt;code class=&quot;highlighter-rouge&quot;&gt;~/buildAgent/bin/jetbrains.teamcity.BuildAgent.plist&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;~/Library/LaunchAgents/&lt;/code&gt;&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;Further / more up to date details are available in &lt;a href=&quot;https://www.jetbrains.com/help/teamcity/setting-up-and-running-additional-build-agents.html#Installing+Additional+Build+Agents&quot;&gt;this&lt;/a&gt; section of the TeamCity documentation.&lt;/li&gt;
  &lt;li&gt;The days of Java being easily available on macOS are unfortunately gone. Disregard the java install flow suggested by macOS / Xcode and in stead install / fix Homebrew, using it to install the necessary Java version (at time of writing Java 8):&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew cask &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;adoptopenjdk8
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;If opting to run appcenter-cli in a QUEMU/KVM based VM, do note that its upload process seems especially susceptible to problems in the default VM driver for the NIC. Making sure that this is set as &lt;code class=&quot;highlighter-rouge&quot;&gt;virtio&lt;/code&gt; in stead eliminated some hefty delays when we were still running in a full VM-based agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;wrap-and-future&quot;&gt;Wrap and future&lt;/h2&gt;

&lt;p&gt;In general we are pretty happy with this setup. Iteration speed is really snappy, it serves all our needs, and the full flexibility facilitates some pretty cool options. Services are backed up off-premises on the same schedule as everything else and support delays &amp;amp; limitations are zero. Obviously establishing things took a bit more doing than signing up for some services and connecting them, but that cost is nowhere near a place where I would consider trading in all the upsides we have found.&lt;/p&gt;

&lt;p&gt;Aside from that review of the Unity TeamCity plugin, we are not likely to be doing a ton of tinkering with this part of our service setup in the immediate future, but one opportunity I did come across while setting up the AppCenter flow was managing distribution group composition via the cli. If so inclined, it might be interesting to have an infrequently run configuration use this to synchronise distribution groups with the Xcode signing groups - especially in a scenario where large groups of recipients are managed and frequently modified. Not currently relevant for us, but it seemed like an interesting project.&lt;/p&gt;

&lt;p&gt;Anyway, that’s about it. I hope you found something useful in this overview and best of luck in whatever it is you do.&lt;/p&gt;

</description>
				<published>2020-12-29 00:00:00 +0100</published>
				<link>http://www.angryant.com/2020/12/29/Unity-iOS-TeamCity-AppCenter/</link>
			</item>
			
		
			
			<item>
				<title>RAID0 NVMe on Ubuntu</title>
				<description>&lt;p&gt;A bit of an odd topic after a period of silence, but it’s something that annoyed me greatly recently and so I wanted to spare others that experience. Meanwhile, what has been keeping the updates? &lt;a href=&quot;http://framebunker.com&quot;&gt;framebunker&lt;/a&gt; and &lt;a href=&quot;http://playstaticsky.com&quot;&gt;StaticSky&lt;/a&gt; have! In case you missed it, I started (slowly) brushing off and open-sourcing some of our work there (yes, I’ll do what I can to move through my “to open source” list faster): &lt;a href=&quot;https://github.com/framebunker/Utilities&quot;&gt;https://github.com/framebunker/Utilities&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update January 2020&lt;/em&gt;:
Found &amp;amp; updated the link to the blog post which mentioned the appropriate sectors to clear on SSDs for md. Also one of the people who assisted in the Keybase team, David Hauken, wrote &lt;a href=&quot;https://david.hauken.us/posts/2019/11/ubuntu-desktop-raid0-roll-out-with-optional-luks-disk-encryption/&quot;&gt;a post on this topic&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;challenge&quot;&gt;Challenge&lt;/h2&gt;

&lt;p&gt;So anyway, I set up a new computer at home - the age of my 2013 laptop showing. On that I wanted to run Ubuntu off a full-disk encrypted drive. However a core point of the build is speed and full-disk encryption (via LUKS) does not necessarily go hand in hand with that.&lt;/p&gt;

&lt;p&gt;To offset that, I decided to go for a configuration with two PCIe4 NVMe sticks running in RAID0 (well cooled). Simple enough in principle, but then you hit the community coverage on the topic of “RAID0 is dangerous! Remember to back up your things and don’t pour water on your hardware”. It would appear that an Ubuntu (or event Linux) configuration like this is not super common.&lt;/p&gt;

&lt;p&gt;Luckily there were enough bits and pieces out there to, in combination with invaluable assistance from the people of the &lt;code class=&quot;highlighter-rouge&quot;&gt;sysadmins_unite&lt;/code&gt; Keybase team, string together a solution.&lt;/p&gt;

&lt;h2 id=&quot;process&quot;&gt;Process&lt;/h2&gt;

&lt;p&gt;If, like me, you are migrating an existing install to this setup then first make a backup of that install. I just used rsync - making sure that all file flags etc. were left intact in the copy. In creating the RAID0 across the two NVMe sticks any data already present on either will of-course be lost.&lt;/p&gt;

&lt;p&gt;Next, burn the Ubuntu installer onto a bootable medium. This approach probably work on a ton of other configurations, but given that I have only used it with Ubuntu 18.04, I am going to describe them in that known-to-work context.&lt;/p&gt;

&lt;p&gt;Boot into your installer and fire up a terminal. In these steps it is assumed that the two NVMe sticks mount at &lt;code class=&quot;highlighter-rouge&quot;&gt;/dev/nvme0n1&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;/dev/nvme1n1&lt;/code&gt;. If that is not the case in your setup, replace in the correct name where used. On my setup I was able to verify the mount points both in this installer terminal and in the Asus BIOS.&lt;/p&gt;

&lt;p&gt;The first step is to install the &lt;code class=&quot;highlighter-rouge&quot;&gt;mdadm&lt;/code&gt; tool - for creation and management of md RAID configurations. Note that critical to this particular usecase is the clearing of superblocks and overwriting of first one gigabyte of data. Most guides I came across would instruct clearing data at the end of the target drives, but one (&lt;del&gt;I unfortunately lost the link - sorry about that&lt;/del&gt; never mind - &lt;a href=&quot;https://exastuff.blogspot.com/2018/06/software-raid-with-nvme-devices.html&quot;&gt;found it&lt;/a&gt; in an old window of research tabs) pointed me to the first gigabyte. As I understand it, this is specific to how md operates on SSD or at least NVMe.&lt;/p&gt;

&lt;p&gt;Configuring your RAID:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install mdadm
sudo mdadm --zero-superblock /dev/nvme0n1
sudo mdadm --zero-superblock /dev/nvme1n1
sudo dd if=/dev/zero of=/dev/nvme0n1 bs=1M count=1000
sudo dd if=/dev/zero of=/dev/nvme1n1 bs=1M count=1000
sudo mdadm --create --verbose --level=0 --raid-devices=2 /dev/md0 /dev/nvme0n1 /dev/nvme1n1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With your raid up and running in your installer session, I really hope you did not forget to copy data you really wanted off those sticks. Anyway, the next step is to run the Ubuntu installer, opting to do “something else” when typical vs. not-quite-typical install configuration is chosen. This takes you to a screen where you get to specify which drives and partitions are get used for what in your fancy new install. Necessary config:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Format your new &lt;code class=&quot;highlighter-rouge&quot;&gt;/dev/md0&lt;/code&gt; drive. For me that was formatting to LUKS and then adding an ext4 partition to that. You could also format directly to ext4 if you do not want the encryption, but in that case you might want to do that outside of the installer - for optimum performance. See the later section for specifics on that.&lt;/li&gt;
  &lt;li&gt;Specify that the installer use your final ext4 partition as root &lt;code class=&quot;highlighter-rouge&quot;&gt;/&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Use a different drive and partition for EFI and &lt;code class=&quot;highlighter-rouge&quot;&gt;/boot&lt;/code&gt;. This is critical as your bios will not know how to assemble the md RAID and boot from it - you need &lt;code class=&quot;highlighter-rouge&quot;&gt;/boot&lt;/code&gt; to handle that. There were some very creative suggestions in &lt;code class=&quot;highlighter-rouge&quot;&gt;sysadmins_unite&lt;/code&gt; on where one might put &lt;code class=&quot;highlighter-rouge&quot;&gt;/boot&lt;/code&gt;, but I simply have a SATA drive in my rig used for more rough work and first tier backup. I just set up &lt;code class=&quot;highlighter-rouge&quot;&gt;/boot&lt;/code&gt; and EFI partitions there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it - configure the rest of the installer as you like and run it to completion. When it does complete and prompt you to restart, don’t do that. The RAID still only really exists within this installer session so if you reboot now, you might as well start over.&lt;/p&gt;

&lt;p&gt;The Ubuntu installer will have your new install partition mounted at &lt;code class=&quot;highlighter-rouge&quot;&gt;/target&lt;/code&gt;. You need to make some edits to it in order to have it properly mount and run off your RAID from boot. If you closed the terminal from before, open up a new one and run this:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo mount /dev/[partition used for /boot] /target/boot
sudo mount --bind /dev /target/dev
sudo mount --bind /sys /target/sys
sudo mount --bind /proc /target/proc
sudo cp /etc/resolv.conf /target/etc/
sudo gedit /target/etc/default/grub
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In gedit you need to update the value of &lt;code class=&quot;highlighter-rouge&quot;&gt;GRUB_CMDLINE_LINUX&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;domdadm&quot;&lt;/code&gt;, save, and close the editor.&lt;/p&gt;

&lt;p&gt;Finally you need to add &lt;code class=&quot;highlighter-rouge&quot;&gt;mdadm&lt;/code&gt; to your new install, which will also apply your grub change along with its own to the boot setup, after which we are good to reboot and test the install:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo chroot /target
apt-get install mdadm
exit
sudo reboot now
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you just wanted a fresh install, then this is the “profit!” step. Otherwise, restore your previous install onto your new root partition and update it to support your new boot setup by rebooting into the installer again and running this in a terminal:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install mdadm
sudo mdadm -A -s
sudo mkdir /target
sudo mount /dev/md0 /target
sudo mount --bind /dev /target/dev
sudo mount --bind /sys /target/sys
sudo mount --bind /proc /target/proc
sudo cp /etc/resolv.conf /target/etc/
sudo chroot /target
apt-get install mdadm
exit
sudo reboot now
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And &lt;em&gt;that&lt;/em&gt; is your “profit!” step.&lt;/p&gt;

&lt;h2 id=&quot;ext4&quot;&gt;ext4&lt;/h2&gt;

&lt;p&gt;If you just want to run ext4 as fast as possible directly on your RAID drive, you might want to manually work out the configuration of that partition to optimally work with the underlying RAID configuration. Key here is specifying the correct stride and stripe-width:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Chunk = 512 (output by or set via mdadm)&lt;/li&gt;
  &lt;li&gt;Block = 4 (ext4 dictated)&lt;/li&gt;
  &lt;li&gt;Devices = 2&lt;/li&gt;
  &lt;li&gt;Stride = 512 / 4 = 128&lt;/li&gt;
  &lt;li&gt;Stripe width = 2 * 128 = 256&lt;/li&gt;
  &lt;li&gt;Resulting in the formatting command &lt;code class=&quot;highlighter-rouge&quot;&gt;sudo mkfs.ext4 -v -L nvmeRAID -m 1 -b 4096 -E stride=128,stripe-width=256 /dev/md0&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;wrapup&quot;&gt;Wrapup&lt;/h2&gt;

&lt;p&gt;I hope this works out for you. It definitely took me more research, trial, and error than I would have liked to arrive at a functional approach. At this point I have been running the resulting setup for a month or two without the hint of an issue.&lt;/p&gt;
</description>
				<published>2019-12-07 00:00:00 +0100</published>
				<link>http://www.angryant.com/2019/12/07/RAID0-NVMe-on-Ubuntu/</link>
			</item>
			
		
			
			<item>
				<title>A Change of Gears</title>
				<description>&lt;p&gt;Having completed my latest contract, working splendidly with Charles and Nicholas over at &lt;a href=&quot;http://framebunker.com&quot;&gt;framebunker&lt;/a&gt;, we decided to extend our combined reach and potential by joining forces.&lt;/p&gt;
&lt;p&gt;I got into contracting in the first place in order to find a new team. This year I had made it my mission to end that search and as it turned out, the team was much closer than expected.&lt;/p&gt;
&lt;p&gt;What this means:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Contracting continues, now through &lt;a href=&quot;http://framebunker.com&quot;&gt;framebunker&lt;/a&gt;. If you have a job that needs doing, &lt;a href=&quot;http://framebunker.com/#contact&quot;&gt;give us a shout&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;We enter into final production on &lt;a href=&quot;http://playstaticsky.com&quot;&gt;Static Sky&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;As &lt;a href=&quot;http://playstaticsky.com&quot;&gt;Static Sky&lt;/a&gt; ramps down, we spin up new and exciting production &amp;#8211; stay tuned for more updates on that.&lt;/li&gt;
	&lt;li&gt;I pick up the slack on the feed here as we launch a series of technical blog posts from &lt;a href=&quot;http://framebunker.com&quot;&gt;framebunker&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Both &lt;a href=&quot;/behave&quot;&gt;Behave&lt;/a&gt; development and &lt;a href=&quot;http://GameAINorth.com&quot;&gt;Game AI North&lt;/a&gt; organisation continue unaffected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am very excited about this change as it allows us all to be more productive, while maintaining a more stable work environment. I look forward to share more in 2018.&lt;/p&gt;



</description>
				<published>2017-12-28 00:00:00 +0100</published>
				<link>http://www.angryant.com/2017/12/28/A-Change-of-Gears/</link>
			</item>
			
		
			
			<item>
				<title>CoreObject</title>
				<description>&lt;p&gt;I once built a talk with a collection of new hacks. This talk went through a couple of almost-delivered scenarios and with the &lt;a href=&quot;http://GameAINorth.com&quot;&gt;new side projects&lt;/a&gt; I have since accumulated, scheduling gets difficult.&lt;/p&gt;
&lt;p&gt;So I would rather share this stuff in post form now than stall for a possible eventuality. I have no idea how frequent I will be able to post, but here is one at least.&lt;/p&gt;
&lt;h2&gt;Challenge&lt;/h2&gt;
&lt;p&gt;Most Unity projects get spread across multiple scenes very quickly. This is advantageous not only for clearly segmented production, but also for tweaking of load times, streaming, and much more.&lt;/p&gt;
&lt;p&gt;An unfortunate side effect of this is an increase of challenges in referencing objects in a live session, across those scenes. Desired targets include objects baked into specific scenes and specific instances created at runtime.&lt;/p&gt;
&lt;p&gt;Common approaches to solving this include dependency injection and directory singletons &amp;#8211; both of which work really great. Unfortunately they both introduce a level of indirection in the Unity serialisation system, making it impossible to track cross-scene dependencies with generic tools. This also usually adds a programming- or finicky book-keeping step to the process of introducing new conceptual instances.&lt;/p&gt;
&lt;p&gt;If we could solve this challenge, we would end up with a clear dependency chain in the serialisation system, which would allow us to fully utilise the tracking and tooling benefits this yields, while greatly reducing the barrier to add new concepts and interact with existing ones.&lt;/p&gt;
&lt;h2&gt;Detour&lt;/h2&gt;
&lt;p&gt;With each scene a serialised island, there is one more (ignoring bundles) serialisation hub which all scenes can access: Assets.&lt;/p&gt;
&lt;p&gt;Both the instance and its consumer can reference the same asset, which we can then use to facilitate a connection between the two. Further, with both referencing the same asset, we now have that dependency information in the serialisation system. Also, adding new conceptual instances is just a matter of creating a new asset, assigning it to either end.&lt;/p&gt;
&lt;p&gt;Another bonus is easy listing of all conceptual instances by simply finding all assets of the type. You can demonstrate this via the object picker. Should you prefer a drop-down selector to the object picker, such would be a fairly straight forward piece of property drawer code. You could even utilise asset folder structure to define drop-down nesting.&lt;/p&gt;
&lt;h2&gt;Implementation&lt;/h2&gt;
&lt;p&gt;The base (5.3 tested) implementation of this needs three pieces:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A &lt;code&gt;ScriptableObject&lt;/code&gt; type representing the conceptual instance as an asset.
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8/raw/CoreObject.cs&quot;&gt;Example abstract&lt;/a&gt;, &lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8/raw/CoreGameObject.cs&quot;&gt;example concrete&lt;/a&gt;.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;One &lt;code&gt;MonoBehaviour&lt;/code&gt; registering a source.
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8/raw/CoreGameObjectInstance.cs&quot;&gt;Example&lt;/a&gt;.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;A serialized reference to the &lt;code&gt;ScriptableObject&lt;/code&gt; type or a &lt;code&gt;MonoBehaviour&lt;/code&gt; acting as a gateway to the instance &amp;#8211; similar to a &lt;code&gt;MeshFilter&lt;/code&gt; component.
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8/raw/Test.cs&quot;&gt;Example&lt;/a&gt;.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the given example, the instances being passed around are just &lt;code&gt;GameObjects&lt;/code&gt;. However in a real world scenario you may also want to create &lt;code&gt;CoreObject&amp;lt;T&amp;gt;&lt;/code&gt; derivatives passing references to specific components. Not only does this facilitate quicker access to the components you need &amp;#8211; it also naturally separates &lt;code&gt;CoreObjects&lt;/code&gt; into categories.&lt;/p&gt;
&lt;p&gt;A corresponding instance component could look a little something like &lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8/raw/CoreCharacterInstance.cs&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Variants&lt;/h2&gt;
&lt;p&gt;While this base functionality has plenty of utility, I have on occasion played around with variants on the concept. For one, the base idea passes a single-source instance producer to multiple consumers, but there is no reason why you could not use this setup to register/unregister to a list of instances in stead.&lt;/p&gt;
&lt;p&gt;A personal favourite variant is more fundamentally different. In stead of facilitating references, the core objects wrap &lt;code&gt;UnityEvents&lt;/code&gt; &amp;#8211; turning them into global &amp;#8220;game events&amp;#8221;. This allows you to completely decouple event producers and consumers, while maintaining dependency tracking through the serialisation system.&lt;/p&gt;
&lt;p&gt;The pattern I mostly use such events in start with the producers invoking the event via a serialised &lt;code&gt;UnityEvent&lt;/code&gt;. Say you expose a &amp;#8220;fire&amp;#8221; &lt;code&gt;UnityEvent&lt;/code&gt; to which you add a particle effect invocation, audio playback, and finally the invocation of the &lt;code&gt;CoreGameEvent&lt;/code&gt; &amp;#8220;gunshot&amp;#8221;.&lt;/p&gt;
&lt;p&gt;This &amp;#8220;gunshot&amp;#8221; event would then be referenced by &lt;code&gt;CoreGameEventHandler&lt;/code&gt; components which also exposes a &amp;#8220;handle&amp;#8221; &lt;code&gt;UnityEvent&lt;/code&gt;. The action list of this event could then include stuff like switching the soundscape, putting NPCs into an alert state, trigger an auto save, and whatever else might be useful.&lt;/p&gt;
&lt;p&gt;Not only do you get decoupling of produces and consumers &amp;#8211; you also get to centralise handling details around the individual consumers as opposed to leaving them all jumbled up at the producer.&lt;/p&gt;
&lt;p&gt;So what do you think? Do you use something similar? What cool variants and tooling do you employ?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/65b1289fe0af88c6e5fce7f3001bd0c8&quot;&gt;Source and examples&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;





</description>
				<published>2017-07-04 00:00:00 +0200</published>
				<link>http://www.angryant.com/2017/07/04/CoreObject/</link>
			</item>
			
		
			
			<item>
				<title>Unity Protocol Buffers</title>
				<description>&lt;p&gt;Time for another &amp;#8220;ah, crap &amp;#8211; better put &lt;strong&gt;something&lt;/strong&gt; up here before heading to &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt;&amp;#8221;-post. And since I did some re-tinkering with the integration of &lt;a href=&quot;https://developers.google.com/protocol-buffers/&quot;&gt;protobuf&lt;/a&gt; in Behave late last year, some sharing on that topic seemed in order.&lt;/p&gt;
&lt;p&gt;So yes, stuff is happening with Behave &amp;#8211; no abandonment has taken place. On the contrary I have been working on several, long-running, feature branches. I&amp;#8217;ll get around to merging some of those in and doing another release. More on that soonish.&lt;/p&gt;
&lt;p&gt;Anywho, last I checked, &lt;a href=&quot;https://github.com/mgravell/protobuf-net&quot;&gt;protobuf-net&lt;/a&gt; was still a more complete solution than the younger &lt;a href=&quot;https://github.com/google/protobuf/tree/master/csharp&quot;&gt;protobuf for C#&lt;/a&gt; one, so I still stick with protobuf-net and can therefore only talk about that here. However it looks like the latter is seeing more rapid development, so I&amp;#8217;ll probably review my choice when next I need to tinker with the integration.&lt;/p&gt;
&lt;p&gt;More interestingly, some of the initial people behind protobuf have since gone and built the new and shiny &lt;a href=&quot;https://capnproto.org&quot;&gt;Cap&amp;#8217;n Proto&lt;/a&gt;. This looks to be even more powerful than its predecessor, but at time of writing it is still not as mature or implementation-rich as protobuf. Critically for the context of this post, there is no C# implementation yet. Cool stuff, though &amp;#8211; worth keeping an eye on.&lt;/p&gt;
&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;So what is the Protocol Buffers project? Succinctly, it is a compact binary serialisation format with very fast cross-platform and -language implementations. Super useful when you need to quickly move some data between memory and some other location &amp;#8211; a file / a network peer / whatever.&lt;/p&gt;
&lt;p&gt;It was first designed, implemented, and maintained by Google for communications between network peers on their internal network. Since then, it has been implemented in a number of different languages &amp;#8211; including the &lt;a href=&quot;https://github.com/mgravell/protobuf-net&quot;&gt;protobuf-net&lt;/a&gt; implementation, built and maintained by &lt;a href=&quot;https://github.com/mgravell&quot;&gt;Marc Gravell&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Serialisation use in Behave has gone through a couple of distinct phases:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;.net binary serialiser for asset.&lt;/li&gt;
	&lt;li&gt;protobuf-net for asset.&lt;/li&gt;
	&lt;li&gt;protobuf-net for asset and remote debugger protocol.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; for asset, protobuf-net for remote debugger protocol.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Additionally I&amp;#8217;ve used protobuf-net for runtime saving or build pipelines on various client projects.&lt;/p&gt;
&lt;p&gt;Aside from speed and compression, protobuf-net vs. the .net binary serialiser was also an escape of the frustrating lack of support for versioning or even simple structural refactors of serialised types. The switch to &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; for the .behave asset files of-course came when I decided that merge-ability could be a fun thing to support.&lt;/p&gt;
&lt;p&gt;On top of this general migration, I also went through a couple of different protobuf-net integrations &amp;#8211; as my use cases and requirements changed. It just so happens that this gave me full coverage of the three approaches supported by protobuf-net, so no need for extra research before writing this post. Win!&lt;/p&gt;
&lt;h2&gt;Integration&lt;/h2&gt;
&lt;p&gt;For serialisation to work, you need a a serialiser and a schema. Protobuf-net offers a couple of ways for you to provide those:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;[Attribute] markup with runtime generated serialiser.&lt;/li&gt;
	&lt;li&gt;[Attribute] markup with pre-generated serialiser.&lt;/li&gt;
	&lt;li&gt;.proto file description with pre-generated serialiser.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I did this list in order of simplicity, which also happens to be the order in which I switched through them in the integration with Behave.&lt;/p&gt;
&lt;p&gt;The first option is very .net esque and protobuf-net is indeed compatible both with its own serialisation attributes and the more general-purpose .net serialisation attributes. However since your interest here is in a Unity context, I&amp;#8217;m sure that you have already spotted the problem with this approach.&lt;/p&gt;
&lt;p&gt;Given that my initial use for protobuf-net was just for asset serialisation (which is editor-time only), I had no problem with the serialisation solution relying on &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; compilation in order to construct the serialiser at runtime. However as soon as I expanded my use case to include the runtime debugger, relying on &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; would mean not supporting the debugger on &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; platforms like iOS and consoles. Further, as Unity continues transitioning to their IL2CPP solution, you&amp;#8217;re looking at a future where most will want to do &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; on all platforms.&lt;/p&gt;
&lt;p&gt;So when introducing the remote debugger (previous debugger implementation was just 100% in-editor), I started to pre-generate the serialiser. This entails feeding your compiled assembly with [Attribute] markup to the protobuf-net precompile tool, which in turn generates an assembly with the serialiser type. For an example of how I used to do that, here&amp;#8217;s a &lt;a href=&quot;https://gist.github.com/AngryAnt/7223d692ec9d2fd12053e5b04f57296a&quot;&gt;snippet of perl&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Extraction&lt;/h2&gt;
&lt;p&gt;Everything works! Win, right? Well&amp;#8230; as I was expanding debugger support to non-C# targets and doing a general code cleanup, I got increasingly annoyed by having serialisation implementation detail in my general data type code. So I started looking at how protobuf-net supports the standard protobuf .proto format for schema definition.&lt;/p&gt;
&lt;p&gt;As things stand, it takes a bit of work &amp;#8211; specifically &lt;a href=&quot;https://github.com/mgravell/protobuf-net/pull/163&quot;&gt;this work&lt;/a&gt; &amp;#8211; to get going, but once there it is solid. In stead of using the precompile tool, you need to build and run the protogen tool from the protobuf-net repository. If you&amp;#8217;re on Windows, things may just work straight out of the gate, but you may want to see what is in my patch anyway.&lt;/p&gt;
&lt;p&gt;So how does this work? Well, the input is no longer [attribute] marked assemblies, but in stead a .proto definition file. You can find great detail on that in the general &lt;a href=&quot;https://developers.google.com/protocol-buffers/&quot;&gt;protobuf&lt;/a&gt; documentation, but you may want to consult the &lt;a href=&quot;https://github.com/mgravell/protobuf-net&quot;&gt;protobuf-net&lt;/a&gt; docs for implementation specifics/limits. Also, the output is not an assembly, but simply a C# file.&lt;/p&gt;
&lt;p&gt;Keep in mind that protogen relies on the protoc tool from the general Google protobuf tools. I fetched this from homebrew as the &amp;#8220;protobuf&amp;#8221; package.&lt;/p&gt;
&lt;p&gt;Again I have a &lt;a href=&quot;https://gist.github.com/AngryAnt/16c548412cdf1dba30140e8cdd97dc64&quot;&gt;snippet of perl&lt;/a&gt; to illustrate use &amp;#8211; as well as an &lt;a href=&quot;https://gist.github.com/AngryAnt/f053be0c4c66fafde17d679c2d09a9c9&quot;&gt;example .proto file&lt;/a&gt;. In this case the Behave debugger protocol definition.&lt;/p&gt;
&lt;p&gt;Using this approach, I now have a nicely separated codebase and no duplication of schema definition between the C# debugger runtime and others. One trick remains though&amp;#8230;&lt;/p&gt;
&lt;h2&gt;Object pooling&lt;/h2&gt;
&lt;p&gt;A mildly active Behave debugger session involves a lot of messages. I have very little interest in blowing up the garbage collector by constantly instantiating new messages and leaving them to get collected. So how do we integrate an object pool setup with the generated protobuf-net serialiser?&lt;/p&gt;
&lt;p&gt;While not exactly as pretty as I would like, my answer is making use of the partialness of the generated types &amp;#8211; in order to add &lt;a href=&quot;https://gist.github.com/AngryAnt/1ed005b443202f6dcebc9649d59ae2d2&quot;&gt;a static pool and -constructor&lt;/a&gt; to hook it up.&lt;/p&gt;
&lt;p&gt;And that&amp;#8217;s pretty much what I&amp;#8217;ve got. If I missed something or you have related questions, feel free to ping me and I&amp;#8217;ll try to update this post when I can.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://developers.google.com/protocol-buffers/&quot;&gt;protobuf&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mgravell/protobuf-net&quot;&gt;protobuf-net&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/google/protobuf/tree/master/csharp&quot;&gt;protobuf for C#&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://capnproto.org&quot;&gt;Cap&amp;#8217;n Proto&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mgravell&quot;&gt;Marc Gravell&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/7223d692ec9d2fd12053e5b04f57296a&quot;&gt;Precompiler perl&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mgravell/protobuf-net/pull/163&quot;&gt;protogen patch&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/16c548412cdf1dba30140e8cdd97dc64&quot;&gt;protogen perl&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/f053be0c4c66fafde17d679c2d09a9c9&quot;&gt;Protocol.proto&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/1ed005b443202f6dcebc9649d59ae2d2&quot;&gt;Object pool integration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;








</description>
				<published>2017-02-17 00:00:00 +0100</published>
				<link>http://www.angryant.com/2017/02/17/Unity-Protocol-Buffers/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.7</title>
				<description>&lt;p&gt;The serialisation update is here! Ok maybe that is not the most exciting change for everyone, but I for one am quite happy about having finally shipped it. Aside from making life a lot simpler for anyone vaguely interested in collaborating on Behave libraries across version control systems, this lays the groundwork for a good number of runtime changes I have been wanting to do for a while.&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;Aside from just fixing up serialisation, this release focuses on improving editor usability with a good selection of tweaks and features. Some choice examples:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Behaviour tree minimap navigation.&lt;/li&gt;
	&lt;li&gt;Subtle indicator of tree origin direction when it is out of canvas view.&lt;/li&gt;
	&lt;li&gt;&amp;#8220;Larger fonts&amp;#8221; toggle for better visibility.&lt;/li&gt;
	&lt;li&gt;Hiding of component- and sidebar, plus a bunch of other canvas navigation tweaks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Onward&lt;/h2&gt;
&lt;p&gt;After clearing this serialisation system obstruction out of the way, the road is now open for a host of planned features. Most of these are aimed at improving runtime flexibility, by increasing the available options for the tools you are already familiar with.&lt;/p&gt;
&lt;p&gt;If you happen to be at this years &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; in a little months time, perhaps we could meet and exchange ideas on this?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.7:
 - New library serialisation.
     - Backwards compatible with all 2.x variants.
     - All other formats are deprecated: text, binary, export/asset.
         - Exports are auto-upgraded, but please make sure to follow editor instructions when opening asset-type libraries.
         - Run your upgrades now. Future versions of Behave will not support deprecated serialisation.
     - Support for pre-2.0 decorators finally dropped.
     - Faster and less frequent serialisation.
     - Designed for optimal inter action with version control systems.
     - Custom inspector for Behave libraries is dropped in Unity 4.
         - Aside from the visuals, this just means that the Behave window now only can be launched by double-clicking the library or via the Window menu.
 - Behaviour tree minimap navigation - activate via alt+space.
 - Float/Clamp toggle for turning off canvas clamping when setting up large new tree structures.
 - Subtle indicator of tree origin direction when it is out of canvas view.
 - &quot;Warn on non-mandatory actions and contexts&quot; compiler toggle to support team communications.
 - &quot;Larger fonts&quot; toggle for better visibility.
 - Hiding of component- &amp;amp; sidebar.
 - Similar to reference components, components (and connections) referencing records can now also be double-clicked to navigate there.
 - Compiler adapted to new Unity distribution structure on OS X with Unity 5.4.
 - Home screen update.
 - Improved editor performance - particularly on larger libraries.
 - Better error handling for establishing debugger connections.
 - Tidying up and calming antivirus software by using Unity project Temp folder in stead of global temp.


2.6.4:
 - Fixed protobuf compatibility with Unity Windows.NET build targets.


2.6.3:
 - Fixed compiler execution on certain versions of OS X.
 - Minus one popup in the Windows compilation process.


2.6.2:
 - Fixed Windows compiler issue.


2.6.1:
 - Addressed Unity 5.1 compiler configuration compatibility issue.


2.6:
 - Removed backwards compatibility with Behave 1.x assets. That should be sufficient grace.
 - Removed a number of utility types from publicly accessible namespace - should be a lot less cluttered now.
 - Changed Tree.TickWrapping to now take exception handling behaviour parameter as an enum in stead of a boolean.
 - Changed Tree.LastTickTime to return DateTime ticks rather than a UnityEngine.Time.time value.
 - Fixed corner case where Unity could lock up while stripping Behave.
 - Fixed setting of Tree.LastTicked and Tree.ActiveID. Both will always reset to ActionType.Unknown, never -1.
 - Fixed compiler being able to handle Unity being installed on a path containing spaces.
 - Improved compiler error messages.
 - Added intellisense documentation to the runtime API.
 - Added int[] Tree.SupportedActions.
 - Added Tree.Owner for better handling of agent reassigning in pooling scenarios and similar.
 - Added ICollection. GetAsInt (int) and GetAsBool (int).
 - Action handler classes.
     - Added IActionClass and Tree.SetForwards (int, IActionClass) for init/tick/reset handling to a specific class instance.
     - Added Tree.ReflectForwards (GameObject) setting forwards for MonoBehaviours implementing IActionClass.
 - Editor polish.
     - &quot;Now Behave library being edited&quot; label now comes with a shortcut &quot;Create&quot; button.
     - More informative load messages in the home screen, including progress bars.
     - With Unity 5 dropping the engine feature delta, in-editor video viewing is now available on non-pro licenses as well.


2.5.4:
 - Address Unity 5 compatibility issue with the home screen.


2.5.3:
 - Fix issue with home screen not closing.


2.5.2:
 - Play nice on Unity free again.


2.5.1:
 - More rigid network code for setting up the debugger.
 - Upgraded protobuf-net distribution to r668, Unity, full.
 - Drowned out debug logging accidentally included in 2.5.0.


2.5:
 - Optional text serialisation.
     - Switch between text and binary serialisation in library settings.
     - Full and partial exports to text or binary file.
     - NOTE: Libraries opened in this version of Behave will be upgraded and are afterwards not backwards compatible.
 - Compiler upgrade.
     - Added lots of little CPU and memory optimisations.
     - Added tree analysis leading to larger memory saves on references when possible.
     - Improved handling of circular references.
     - Improved error reporting.
     - Changed name validation.
         - Underscores are no longer allowed in names - in order to avoid name clashes with pathed assets.
         - Fixed previously allowing leading numbers in names.
 - Runtime API.
     - Added library.ReflectForwards (ICollection, object).
     - Added library.SupportedRecords (ICollection).
     - Added blueprint.SupportedTrees.
     - Added Library.DidInstantiate (ICollection / Tree).
     - Changed generated enums to be valued continuously.
     - Changed get calls for unhandled records to now return -1.
 - Editor polish.
     - Improved debugger view.
         - Improved control bar layout.
         - Improved rendering of active referenced trees.
         - Fixes to follow-focus.
         - Debug view no longer re-crops to current visible tree area, preventing the previous behaviour of the view jumping around even without follow-focus enabled.
         - Improved sidebar listing of available- and connected runtimes.
         - Improved handling of disconnecting runtimes.
         - Improved tracking of available runtimes. No more need for refreshing.
         - Improved UI for adding debugger overrides.
         - Added &quot;Add overrides enabled&quot; setting (on by default).
     - Library vertical scrollbar replaced by standalone scroll buttons top / bottom when relevant - reducing visual noise.
     - Smaller tweaks and fixes.
 - Improved internal test coverage.


2.4.2:
 - Fixed some issues related to handling priority selectors in the recently update debugger.


2.4.1:
 - Fix corner case when restructuring library assets.


2.4:
 - Introducing “records”.
     - Float fields stored in “collections” - essentially ‘smart tables’.
     - Blackboard fields.
     - Utility curves.
     - Utility graphs.
     - Behaviour Tree integration.
          - “Tester” component.
          - “Writer” component.
          - Record mode for Priority Selector component.
 - Editor behavioural change: Deleting a tree no longer deletes reference nodes targeting that tree from other trees. Their target is merely cleared.
 - Editor behavioural change: The Reference node is only available in the component bar if the library contains more than one tree. Same behaviour for Tester and Writer with records.
 - Behavioural change: Invert flag is now properly applied by the Priority Selector.
 - Debugger connection stability improvement.
 - Connection disabling has been removed. This confusing feature caused more harm than good.
 - Video player now displays video title and description.


2.3.5:
 - Fix home screen video player.


2.3.4:
 - Better error messages in case of insufficient file access privileges (OHAI Perforce).
 - Added simple version check to the home screen.
 - New icons for Priority Selector and &quot;form new tree&quot;.
 - Smaller, embedded, JSON library.
 - Fix annoying behaviour with tree renaming where text fields would keep last entry.
 - Fix similar behaviour with component text fields on tree selection change.
 - Unity 5 compatibility fixes (tested on beta 2).


2.3.3:
 - Fix focus handling issue with auto-complete.
 - Parametrisation is now correctly applied for reset handler calls.


2.3.2:
 - Fix sidebar item duplication and deletion only functional during rename.


2.3.1:
 - Fix GUI error being logged on tree selection.
 - Proper handling of currently edited library asset being deleted.


2.3:
 - Added support for instant repeaters.
 - Added support for mandatory contexts.
 - Added optional target parameter to Tree.ResetForwards.
 - Added Tree.TickWrapping method.
 - Added debugger auto-launch settings to library build options.
 - Added home screen - shown on launch or via the Help menu, full of resources.
 - Behavioural change: Decorators no longer forward the instant flag of their child node.
 - Behaviour of decorators receiving a Running signal from their control connection is now defined.
 - Dependencies now shipped as separate (replaceable) files for minimal project impact.
 - Editor polish.
     - Added support for running multiple editor debugging instances on one machine.
     - Added focus-follow for debugger and canvas.
     - Added both scrollwheel/pad and drag-to-scroll support to all canvas views.
     - Drag connection to occupied input slot to replace.
     - Directly drag-drop trees from the sidebar onto the canvas as reference nodes.
     - Instant flag doesn't show on nodes connected to parents ignoring the flag.
     - &quot;Last edited library&quot; now tracked per project.
     - Last selected tree is now also restored between sessions and playmode transitions.
     - A bunch of minor adjustments and improvements.
     - Performance + memory + disk space optimisations.
     - Minor bugfixes.
 - New documentation layout and enhancements (already released as available).
 - Reshuffling of code to make way for exciting new things down the road.


2.2.2:
 - Addressed protobuf issue causing Parallel component completion setting to not get stored correctly.


2.2.1:
 - Fixed issue causing parallel components to fail compilation.


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2016-02-13 00:00:00 +0100</published>
				<link>http://www.angryant.com/2016/02/13/Behave-2-7/</link>
			</item>
			
		
			
			<item>
				<title>Learn</title>
				<description>&lt;p&gt;I&amp;#8217;m just about to wrap up a weeks vacation before it&amp;#8217;s back on the horse again &amp;#8211; as I leave for the &lt;a href=&quot;http://nucl.ai&quot;&gt;nucl.ai&lt;/a&gt; conference Sunday morning. If you&amp;#8217;re going, maybe I&amp;#8217;ll see you there? If not, you should go check out the &lt;a href=&quot;http://aigamedev.com/broadcasts/nuclai15-stream/&quot;&gt;live stream&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Basis&lt;/h2&gt;
&lt;p&gt;Anyway, so in my vacation I built a little project when I could find a bit of time here and there. It was inspired by work on a client project earlier in the year, where we looked at wiring up a neural network for analysis of a noisy sensor.&lt;/p&gt;
&lt;p&gt;The problem at the time was that although I could find a few C# NN libraries here and there, they were either not really a good fit or had a not-so-open open-source license like &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt; (good thing I don&amp;#8217;t have comments enabled here, eh?).&lt;/p&gt;
&lt;p&gt;Anyway, that felt a bit silly, so I figured that I&amp;#8217;d at least get the ball rolling on a somewhat sane, &lt;span class=&quot;caps&quot;&gt;MIT&lt;/span&gt; licensed, alternative. Either that or just have some fun with it until someone would point me at the obvious alternative solution, which I had overlooked in my earlier search.&lt;/p&gt;
&lt;h2&gt;Project&lt;/h2&gt;
&lt;p&gt;In its initial shape, the library just lets you construct a layered network, randomize its weigths, train it with a straight forward implementation of back-propagation with adjustable learning rate and momentum, and of-course run it.&lt;/p&gt;
&lt;p&gt;There is no serialisation interface yet, I&amp;#8217;ll probably want to do a simplification pass over it, and I have a few edge case tests I&amp;#8217;d like to run. However all of that is noted on the project &lt;span class=&quot;caps&quot;&gt;TODO&lt;/span&gt; and shouldn&amp;#8217;t amount to all that much work &amp;#8211; in case you fancy taking a stab at it.&lt;/p&gt;
&lt;p&gt;I did set up a little Unity project for testing though (the library itself does not depend on anything in Unity). It has a few debug views, a test scenario of the &lt;span class=&quot;caps&quot;&gt;XOR&lt;/span&gt; case, and a curve visualisation of training error. Look, I uploaded several pretty pictures:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/133789555&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;Access&lt;/h2&gt;
&lt;p&gt;Feel like giving it a go? As mentioned, the license is &lt;span class=&quot;caps&quot;&gt;MIT&lt;/span&gt;, so you can really do whatever with it. However should you want to contribute, pull requests are most welcome. I don&amp;#8217;t know how much time I can spare on this next to contracts and Behave, but at least it was a fun thing to work-on-while-not-working.&lt;/p&gt;
&lt;p&gt;Whatever the case, this is where you can find the repositories:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/Learn&quot;&gt;Learn&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/LearnUnityTest&quot;&gt;Unity test project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


</description>
				<published>2015-07-17 00:00:00 +0200</published>
				<link>http://www.angryant.com/2015/07/17/Learn/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.6</title>
				<description>&lt;p&gt;Still plenty of open feature branches on Behave, but now is the time for the next drop. With a little over a week till Unite Europe and shortly thereafter nucl.ai (formerly GameAIconf), I&amp;#8217;m also heading into a bit of a plenty-to-do period. Perhaps we&amp;#8217;ll meet at the conference and have a chat about it?&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;With only minor editor tweaks, the 2.6 release of Behave focuses primarily on &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; changes and added capabilities. The more exciting of these is probably the addition of action classes, allowing you to implement actions not just as singular event handlers on agent classes, but as standalone classes &amp;#8211; or in the case of Unity, as components.&lt;/p&gt;
&lt;p&gt;The reference documentation has been updated with a &amp;#8220;Composition&amp;#8221; section describing the setup in more detail.&lt;/p&gt;
&lt;p&gt;Do note that in this release, Behave is no longer backwards compatible with Behave 1.x assets.&lt;/p&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;Unfortunately some planned features are taking a bit longer as they depend on a serialisation system refactor, requiring an extended period of focus. The groundwork for this has been effectuated and given time, should shoulder an effective change leading to interesting new capabilities.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.6:
 - Removed backwards compatibility with Behave 1.x assets. That should be sufficient grace.
 - Removed a number of utility types from publicly accessible namespace - should be a lot less cluttered now.
 - Changed Tree.TickWrapping to now take exception handling behaviour parameter as an enum in stead of a boolean.
 - Changed Tree.LastTickTime to return DateTime ticks rather than a UnityEngine.Time.time value.
 - Fixed corner case where Unity could lock up while stripping Behave.
 - Fixed setting of Tree.LastTicked and Tree.ActiveID. Both will always reset to ActionType.Unknown, never -1.
 - Fixed compiler being able to handle Unity being installed on a path containing spaces.
 - Improved compiler error messages.
 - Added intellisense documentation to the runtime API.
 - Added int[] Tree.SupportedActions.
 - Added Tree.Owner for better handling of agent reassigning in pooling scenarios and similar.
 - Added ICollection. GetAsInt (int) and GetAsBool (int).
 - Action handler classes.
     - Added IActionClass and Tree.SetForwards (int, IActionClass) for init/tick/reset handling to a specific class instance.
     - Added Tree.ReflectForwards (GameObject) setting forwards for MonoBehaviours implementing IActionClass.
 - Editor polish.
     - &quot;Now Behave library being edited&quot; label now comes with a shortcut &quot;Create&quot; button.
     - More informative load messages in the home screen, including progress bars.
     - With Unity 5 dropping the engine feature delta, in-editor video viewing is now available on non-pro licenses as well.


2.5.4:
 - Address Unity 5 compatibility issue with the home screen.


2.5.3:
 - Fix issue with home screen not closing.


2.5.2:
 - Play nice on Unity free again.


2.5.1:
 - More rigid network code for setting up the debugger.
 - Upgraded protobuf-net distribution to r668, Unity, full.
 - Drowned out debug logging accidentally included in 2.5.0.


2.5:
 - Optional text serialisation.
     - Switch between text and binary serialisation in library settings.
     - Full and partial exports to text or binary file.
     - NOTE: Libraries opened in this version of Behave will be upgraded and are afterwards not backwards compatible.
 - Compiler upgrade.
     - Added lots of little CPU and memory optimisations.
     - Added tree analysis leading to larger memory saves on references when possible.
     - Improved handling of circular references.
     - Improved error reporting.
     - Changed name validation.
         - Underscores are no longer allowed in names - in order to avoid name clashes with pathed assets.
         - Fixed previously allowing leading numbers in names.
 - Runtime API.
     - Added library.ReflectForwards (ICollection, object).
     - Added library.SupportedRecords (ICollection).
     - Added blueprint.SupportedTrees.
     - Added Library.DidInstantiate (ICollection / Tree).
     - Changed generated enums to be valued continuously.
     - Changed get calls for unhandled records to now return -1.
 - Editor polish.
     - Improved debugger view.
         - Improved control bar layout.
         - Improved rendering of active referenced trees.
         - Fixes to follow-focus.
         - Debug view no longer re-crops to current visible tree area, preventing the previous behaviour of the view jumping around even without follow-focus enabled.
         - Improved sidebar listing of available- and connected runtimes.
         - Improved handling of disconnecting runtimes.
         - Improved tracking of available runtimes. No more need for refreshing.
         - Improved UI for adding debugger overrides.
         - Added &quot;Add overrides enabled&quot; setting (on by default).
     - Library vertical scrollbar replaced by standalone scroll buttons top / bottom when relevant - reducing visual noise.
     - Smaller tweaks and fixes.
 - Improved internal test coverage.


2.4.2:
 - Fixed some issues related to handling priority selectors in the recently update debugger.


2.4.1:
 - Fix corner case when restructuring library assets.


2.4:
 - Introducing “records”.
     - Float fields stored in “collections” - essentially ‘smart tables’.
     - Blackboard fields.
     - Utility curves.
     - Utility graphs.
     - Behaviour Tree integration.
          - “Tester” component.
          - “Writer” component.
          - Record mode for Priority Selector component.
 - Editor behavioural change: Deleting a tree no longer deletes reference nodes targeting that tree from other trees. Their target is merely cleared.
 - Editor behavioural change: The Reference node is only available in the component bar if the library contains more than one tree. Same behaviour for Tester and Writer with records.
 - Behavioural change: Invert flag is now properly applied by the Priority Selector.
 - Debugger connection stability improvement.
 - Connection disabling has been removed. This confusing feature caused more harm than good.
 - Video player now displays video title and description.


2.3.5:
 - Fix home screen video player.


2.3.4:
 - Better error messages in case of insufficient file access privileges (OHAI Perforce).
 - Added simple version check to the home screen.
 - New icons for Priority Selector and &quot;form new tree&quot;.
 - Smaller, embedded, JSON library.
 - Fix annoying behaviour with tree renaming where text fields would keep last entry.
 - Fix similar behaviour with component text fields on tree selection change.
 - Unity 5 compatibility fixes (tested on beta 2).


2.3.3:
 - Fix focus handling issue with auto-complete.
 - Parametrisation is now correctly applied for reset handler calls.


2.3.2:
 - Fix sidebar item duplication and deletion only functional during rename.


2.3.1:
 - Fix GUI error being logged on tree selection.
 - Proper handling of currently edited library asset being deleted.


2.3:
 - Added support for instant repeaters.
 - Added support for mandatory contexts.
 - Added optional target parameter to Tree.ResetForwards.
 - Added Tree.TickWrapping method.
 - Added debugger auto-launch settings to library build options.
 - Added home screen - shown on launch or via the Help menu, full of resources.
 - Behavioural change: Decorators no longer forward the instant flag of their child node.
 - Behaviour of decorators receiving a Running signal from their control connection is now defined.
 - Dependencies now shipped as separate (replaceable) files for minimal project impact.
 - Editor polish.
     - Added support for running multiple editor debugging instances on one machine.
     - Added focus-follow for debugger and canvas.
     - Added both scrollwheel/pad and drag-to-scroll support to all canvas views.
     - Drag connection to occupied input slot to replace.
     - Directly drag-drop trees from the sidebar onto the canvas as reference nodes.
     - Instant flag doesn't show on nodes connected to parents ignoring the flag.
     - &quot;Last edited library&quot; now tracked per project.
     - Last selected tree is now also restored between sessions and playmode transitions.
     - A bunch of minor adjustments and improvements.
     - Performance + memory + disk space optimisations.
     - Minor bugfixes.
 - New documentation layout and enhancements (already released as available).
 - Reshuffling of code to make way for exciting new things down the road.


2.2.2:
 - Addressed protobuf issue causing Parallel component completion setting to not get stored correctly.


2.2.1:
 - Fixed issue causing parallel components to fail compilation.


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2015-06-13 00:00:00 +0200</published>
				<link>http://www.angryant.com/2015/06/13/Behave-2-6/</link>
			</item>
			
		
			
			<item>
				<title>Trusted Gear</title>
				<description>&lt;p&gt;Yay! &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; is next week! Will I see you there?&lt;/p&gt;
&lt;p&gt;Ahem. Straying a bit from my usual theme here of writing about whatever little snippet or gadget I&amp;#8217;ve come up with, for this post I will in stead share some detail on recent changes to my tool-chain of choice, which I&amp;#8217;m quite happy about.&lt;/p&gt;
&lt;p&gt;Every craftsman has his or her opinion on tooling, but just about everyone share the desire to tune their toolbox. Even if your opinion / taste / whatever does not align with mine, I hope that you find something useful in here.&lt;/p&gt;
&lt;p&gt;If you really had your sights on getting some funky code snippet out of this post, here&amp;#8217;s an unholy perl module for firing off native prompt dialogs on OS X and Windows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/9732081d1c76dd3de9d3&quot;&gt;Unholy perl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And with that out of the way, let&amp;#8217;s get something else sorted: This post will likely come off as an ad for a bunch of different software. Other than mentioning it here, I do not intend to do anything about that.&lt;/p&gt;
&lt;p&gt;Note that I primarily work on OS X and some of the tools mentioned in this post are only available on that platform. You might still find at least inspiration in those areas though &amp;#8211; likely very nice Windows and Linux alternatives exist. I did not look.&lt;/p&gt;
&lt;p&gt;However if you are not on OS X, but on a tight schedule, just skip all sections other than the &amp;#8220;Typing&amp;#8221; section (which is probably where you&amp;#8217;ll find the best stuff anyway).&lt;/p&gt;
&lt;h2&gt;Tracking&lt;/h2&gt;
&lt;p&gt;Everyone has a system for remembering projects and TODOs. If you in stead keep it all in your head, I am glad that you&amp;#8217;re not a very busy person &amp;#8211; if you are busy, I would worry.&lt;/p&gt;
&lt;p&gt;Over time I have tried many different systems for keeping track of it all &amp;#8211; having had it as a focus of mine ever since severe physical stress symptoms reminded me that my methods were entirely inadequate.&lt;/p&gt;
&lt;p&gt;One tool that I kept coming back to and which I have recently re-focused on is &lt;a href=&quot;http://www.omnigroup.com/omnifocus/&quot;&gt;OmniFocus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While OmniFocus is by no means perfect (I have my fair share of open suggestion posts with the developers), it does provide me with the best feature combination I have seen in this type of tool. Important to me are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No restrictions or requirements on nesting/indentation depth of items.
	&lt;ul&gt;
		&lt;li&gt;The system has the notion of &amp;#8220;tasks&amp;#8221; existing in &amp;#8220;projects&amp;#8221;, but aside from this I can use folder nesting of projects and nesting of tasks as much as I like &amp;#8211; assigning whatever meaning I want to that.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Everything is synchronised painlessly between fully-featured clients on my laptop, my phone, and my tablet. And it remains accessible when offline.&lt;/li&gt;
	&lt;li&gt;Easy, fast, unintrusive task entry.
	&lt;ul&gt;
		&lt;li&gt;The mobile clients have an always accessible &amp;#8220;add to inbox&amp;#8221; button and the OS X client a global task-entry shortcut.&lt;/li&gt;
		&lt;li&gt;The shortcut fires up a little window over whatever you are currently working, allowing you to quickly type in what you need to remember to do, hitting enter when you&amp;#8217;re done. Optionally you can add more task details before hitting enter and continuing with whatever you were doing.
		&lt;ul&gt;
			&lt;li&gt;This is absolutely perfect when you remember a &lt;span class=&quot;caps&quot;&gt;TODO&lt;/span&gt; unrelated to your current task or someone comes by your desk with a request.&lt;/li&gt;
			&lt;li&gt;My shortcut for task entry is ctrl+alt+space. I do not recall if this is the default.&lt;/li&gt;
		&lt;/ul&gt;&lt;/li&gt;
		&lt;li&gt;The OS X client also comes with a &amp;#8220;service&amp;#8221; integration, allowing you to easily create new tasks from other applications &amp;#8211; like one based on a file or a snippet of text or perhaps an email.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Optional additional classification and data collection.
	&lt;ul&gt;
		&lt;li&gt;Putting tasks in projects is your absolutely minimum flow. Even that I suppose is optional, as you could simply put all your tasks in your inbox. On top of this, you can scale it as little or as much as makes sense for your particular case. I use everything from no additionals to everything &amp;#8211; all dependent on the nature of the task.
		&lt;ul&gt;
			&lt;li&gt;Aside from putting tasks in optional projects in optional folders, each task can also have an associated context. Different tasks in the same project can have different contexts and contexts can have additional information associated with them &amp;#8211; like a location.&lt;/li&gt;
			&lt;li&gt;Assigning a due date to a task will put it in your Forecast view &amp;#8211; allowing you to easily view what needs to get done today. This view can also show a quick overview of todays calendar and you can get notifications as the due time of a task is reached.&lt;/li&gt;
			&lt;li&gt;Each task can have an associated attachment. Anything from a snippet of text to a file / an email / whatever.&lt;/li&gt;
		&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2015-02-26-Trusted-Gear/OmniFocus.png&quot; style=&quot;clear:both;float:none;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I use OmniFocus for all project and task tracking. However I do not try to replace my calendar with it. Scheduled events still go in my calendar (I just use iCal) and I also use my calendar to keep track of what I do with my time when on a contract.&lt;/p&gt;
&lt;p&gt;This allows me to easily summarize for client reports when needed and I have a little Automator workflow calculate the total number of hours spent contracting this week &amp;#8211; allowing me to easily balance the hours.&lt;/p&gt;
&lt;h2&gt;Typing&lt;/h2&gt;
&lt;p&gt;Once I am done dreaming up ideas and tasks, like so many others, the majority of my time is spent as a typist &amp;#8211; translating those tasks into computer-friendly gibberish of one kind or another. Most of the time I find myself typing C#.&lt;/p&gt;
&lt;p&gt;For quite a while I would bounce around between different editors for this task.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;VisualStudio with resharper for maximum efficiency &amp;#8211; at the cost of either rebooting into Windows or running around in the strange parallel universe of virtualisation.&lt;/li&gt;
	&lt;li&gt;MonoDevelop for an approximation of the tools provided by VisualStudio, feeling not quite native anywhere, but very beta.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.sublimetext.com&quot;&gt;Sublime Text&lt;/a&gt; for beautiful, responsive, unintrusive text rendering, with a wonderland of user-configurable keyboard shortcuts and extensions. And absolutely nothing in terms of VS- and MD-like project-wide assistance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then a while ago I added a bookmark to the &amp;#8220;check this out&amp;#8221; pile, for a project called &lt;a href=&quot;http://www.omnisharp.net&quot;&gt;OmniSharp&lt;/a&gt;. The promise was simple:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Get full Intellisense-like completion and resharper-like code analysis.&lt;/li&gt;
	&lt;li&gt;Use it in your text editor of choice.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ha! Madness.&lt;/p&gt;
&lt;p&gt;That was probably at least a half year ago &amp;#8211; until I finally found some time to put aside my scepticism for a bit and try to set it up with Sublime.&lt;/p&gt;
&lt;p&gt;You know what? It works!&lt;/p&gt;
&lt;p&gt;This is what I currently use of the OmniSharp + Sublime Text feature set:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Compile check on save &amp;#8211; with errors, warnings, and resharper-like code suggestions.
	&lt;ul&gt;
		&lt;li&gt;Some suggestions I do not agree with and luckily, as with resharper, configuration lets you easily filter those out. Unity also suppresses some warnings when compiling, so I elected to filter those out as well.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;File auto-format when triggered by shortcut.&lt;/li&gt;
	&lt;li&gt;Intellisense-like auto-complete &amp;#8211; file, project and library-wide.&lt;/li&gt;
	&lt;li&gt;Jump to definition / list reference points.&lt;/li&gt;
	&lt;li&gt;Rename.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am probably forgetting something, but suffice to say, I no longer feel the need to switch away from Sublime Text to boost efficiency on an unfamiliar codebase.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/resources/posts/2015-02-26-Trusted-Gear/Sublime.png&quot;&gt;&lt;img src=&quot;/resources/posts/2015-02-26-Trusted-Gear/Sublime-Thumb.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With regards to shortcuts and configuration, there are a bunch of little tweaks you can set up for Sublime, so of-course I have done exactly that. The good part is that Sublime preferences are all &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; formatted text files, so they are easily shared in a gist:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/aab9ff86c2595410d165&quot;&gt;Preferences in a gist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For text editing, that produces a lovely fullscreen view like the one on the right (click for full size). Tasty, right?&lt;/p&gt;
&lt;h2&gt;Searching&lt;/h2&gt;
&lt;p&gt;After lolcat searches and menacingly typing at people who are wrong, I probably spend the majority of my browser time doing reference manual lookups. Extensions like &lt;a href=&quot;http://safarikeywordsearch.aurlien.net&quot;&gt;Safari Keyword Search&lt;/a&gt; in combination with embedded search engines or Google site search have somewhat streamlined this task, but it never really worked solidly and of-course required that I be online while working.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&quot;http://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt;. I can&amp;#8217;t remember who brought it up on twitter, but that&amp;#8217;s where I came across it and bookmarked it for later study. The idea is quite simple: It provides an offline search engine for docsets of your choosing &amp;#8211; much like man pages.&lt;/p&gt;
&lt;p&gt;You get to specify which docsets to download, associate a search key with each docset (IE &amp;#8220;cpp:&amp;#8221; and &amp;#8220;.net:&amp;#8221;), and specify a global shortcut for launching the search window &amp;#8211; as you would Spotlight on OS X. But wait: There&amp;#8217;s more!&lt;/p&gt;
&lt;p&gt;Downloadable docsets include topic-specific downloads of wiki-fied Stackoverflow questions and answers. And since you can associate multiple docsets with the same search key, these are easily accessed when you search.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2015-02-26-Trusted-Gear/Dash.png&quot; style=&quot;clear:both;float:none;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;On top of all of this, Dash also comes with an iPad and iPhone client and integration for a bunch of different editors, environments and other tools &amp;#8211; including Sublime Text.&lt;/p&gt;
&lt;p&gt;You can find my Dash integration settings in the Sublime settings linked above. For global launch shortcut I chose ctrl+shift+space &amp;#8211; I do not recall if this is the default.&lt;/p&gt;
&lt;h2&gt;Navigation&lt;/h2&gt;
&lt;p&gt;If you, like me, grow a tad too accustomed to the default Sublime Text shortcut of alt+cmd+left/right for tab switching, I would recommend giving it a go as a global shortcut across applications. Configuring System Preferences &amp;#8211; Keyboard as shown below did the trick for me. I primarily use it in Terminal and Safari.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2015-02-26-Trusted-Gear/Global-Tabs.png&quot; style=&quot;clear:both;float:none;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;And that is about all I have for now. I hope that this is useful to you and do let me know if something in here is off or if you&amp;#8217;re more curious about something. If you are at &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; in San Francisco next week, you could even do it in person.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.omnigroup.com/omnifocus/&quot;&gt;OmniFocus&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.sublimetext.com&quot;&gt;Sublime Text&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.omnisharp.net&quot;&gt;OmniSharp&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/aab9ff86c2595410d165&quot;&gt;Sublime Text and OmniSharp preferences&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://kapeli.com/dash&quot;&gt;Dash&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/farcaller/DashDoc&quot;&gt;DashDoc &amp;#8211; Dash Sublime integration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;






</description>
				<published>2015-02-26 00:00:00 +0100</published>
				<link>http://www.angryant.com/2015/02/26/Trusted-Gear/</link>
			</item>
			
		
			
			<item>
				<title>Mad Mash Versioning</title>
				<description>&lt;p&gt;Through 2014, I had every once in a while heard people casually mention that they were versioning their projects in a combination of git and &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt;. I didn&amp;#8217;t really take the time to ask for details on it, but it was one of those things, stuck in the back of my mind.&lt;/p&gt;
&lt;p&gt;Filed under &amp;#8220;delightfully mad hacks&amp;#8221;, I finally found some time to look into it over Christmas &amp;#8211; as I was dodging various boring tasks in &lt;a href=&quot;/2015/01/01/Behave-2-5/&quot;&gt;finalising Behave 2.5&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;The Excuse&lt;/h2&gt;
&lt;p&gt;Git is lovely for its decentralisation, easy branching and a bunch of other stuff. However where it is not so delightful is in its handling of binary files.&lt;/p&gt;
&lt;p&gt;One alternative &lt;span class=&quot;caps&quot;&gt;VCS&lt;/span&gt; which is pretty good at handling binary files is &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt;. So by putting binary project files in &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; and text files in git, you should be able to get the best of both worlds, right?&lt;/p&gt;
&lt;p&gt;That is the idea anyway.&lt;/p&gt;
&lt;h2&gt;The Hack&lt;/h2&gt;
&lt;p&gt;Regardless of whether it is a good idea or not, it is an interesting hack. Immediately, it seems like a terrible idea with way too high a potential of user error from its silly workflow overhead. So &lt;strong&gt;that&lt;/strong&gt; is where we&amp;#8217;ll attack.&lt;/p&gt;
&lt;p&gt;The goal is then to have the user place binary files in one folder and text files in other folders &amp;#8211; all under the same core project folder. And then simply commit, update and branch as normally, in the knowledge that everyones local drives will not explode with tons of versioned binary data.&lt;/p&gt;
&lt;p&gt;Our primary concern is keeping &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; and git in sync &amp;#8211; with the proper commits connected. No-one likes &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt;, so we&amp;#8217;ll hide that away and put git in the driver seat.&lt;/p&gt;
&lt;p&gt;Luckily, git operations are also fairly easily customised on a per-repository basis, which is perfect for this case.&lt;/p&gt;
&lt;p&gt;The idea will then be to have git operations keep track of the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; working copy, making sure that everything there is committed before a dependent git revision is committed, at which point a versioned text file with the corresponding &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; version number, should be added to the commit.&lt;/p&gt;
&lt;p&gt;This way, &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; becomes a dictionary of collected binary files, into which git adds new versions when committing and fetches copies when updating &amp;#8211; using &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; version numbers as key.&lt;/p&gt;
&lt;h2&gt;Git Hooks&lt;/h2&gt;
&lt;p&gt;Our entry point in automating this stuff with git is in the so called &amp;#8220;git hook&amp;#8221;. These are scripts located at &amp;#8220;.git/hooks/&amp;#8221; for any git repository. Per default, this folder is populated with a few demo scripts, each containing an example of what to do in response to that particular git event.&lt;/p&gt;
&lt;p&gt;For this hack, the two points of interest are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The commit process &amp;#8211; cancelling the commit if the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; working copy is not clean, otherwise getting its current version and adding it to a text file in that same commit.&lt;/li&gt;
	&lt;li&gt;The checkout process &amp;#8211; updating the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; working copy to the version specified in the text file, every time a git checkout has completed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This means that the files we are interested in are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;(Git clone path)/.git/hooks/pre-commit&lt;/li&gt;
	&lt;li&gt;(Git clone path)/.git/hooks/post-checkout&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that these files are not by default versioned with the rest of your git repository, though I do recommend doing so anyway. For this hack, I chose to address this via a setup script which needs to be run once after first cloning the repository &amp;#8211; as well as after performing any updates to the versioned hook scripts (which I&amp;#8217;d estimate happening just about never).&lt;/p&gt;
&lt;h2&gt;Solution&lt;/h2&gt;
&lt;p&gt;My weapon of choice for this sort of hackery is Perl. If you would rather use something else, that is fine too &amp;#8211; as long as your shell can run it, you should be fine.&lt;/p&gt;
&lt;p&gt;Since we&amp;#8217;re in glorious hack land, I chose to take it further over the top by expanding the text file with the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; version to be a full &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt;-formatted configuration file, with the option of overriding parts with per-user local configuration.&lt;/p&gt;
&lt;p&gt;The project structure is as follows:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;.gitignore &amp;#8211; containing ignores for the local user config as well as the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; folder.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;VCS&lt;/span&gt;/ &amp;#8211; this is where the core perl scripts are kept, as well as configuration.&lt;/li&gt;
	&lt;li&gt;Setup.pl &amp;#8211; the run-once script for copying the hooks in etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the linked Git repository, the example configuration has also been set up for a Unity project &amp;#8211; with the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; working copy placed in Assets/&lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt;. Though aside from this, nothing here is specific to any technology aside from Git and &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Additional over-the-top-ness:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Place a &lt;span class=&quot;caps&quot;&gt;JSON&lt;/span&gt; formatted file at &lt;span class=&quot;caps&quot;&gt;VCS&lt;/span&gt;/LocalUserConfiguration.txt to override select values from what is set in the versioned configuration file.&lt;/li&gt;
	&lt;li&gt;Setup.pl will check for a working copy at the specified &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; path and run a checkout from the specified repository if none is found. So this is really a one-stop-shop kinda thing.&lt;/li&gt;
	&lt;li&gt;&amp;#8220;autoCommit&amp;#8221; and &amp;#8220;autoAdd&amp;#8221; options for mad driver-less running.
	&lt;ul&gt;
		&lt;li&gt;&amp;#8220;autoCommit&amp;#8221; will, if enabled, see the commit script run &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; commit to push any local &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; changes as part of the git commit process.&lt;/li&gt;
		&lt;li&gt;&amp;#8220;autoAdd&amp;#8221; is for off-your-rocker &amp;#8220;Look, ma! No hands!&amp;#8221; setups, where any unversioned files found in the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; folder are automatically added to &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; as part of the git commit process.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why no &amp;#8220;ignore unversioned&amp;#8221; flag? In the example configuration, the &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; folder is put inside a Unity Assets folder. This means that contained files are imported as part of the project and project files outside of &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; can depend on them.&lt;/p&gt;
&lt;p&gt;If you have no problem risking gun-to-foot related injuries with commits missing dependencies, that&amp;#8217;s just fine. However I will not assist you in the loading of said gun.&lt;/p&gt;
&lt;p&gt;I hope that you find this stuff interesting as well &amp;#8211; if not useful. You can find everything at the other end of the below github link and I would be very interested in any feedback and discussion (preferably over &lt;a href=&quot;https://twitter.com/angryant&quot;&gt;twitter&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Are you employing a similar combined &lt;span class=&quot;caps&quot;&gt;VCS&lt;/span&gt; setup? Are you in fact one of those who mentioned using the git+SVN combination in particular? Do you have a suggested alternative to this madness?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/MadMashVersioning&quot;&gt;The below github link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2015-01-02 00:00:00 +0100</published>
				<link>http://www.angryant.com/2015/01/02/Mad-Mash-Versioning/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.5</title>
				<description>&lt;p&gt;Welcome to 2015!&lt;/p&gt;
&lt;p&gt;I hope that you have had a great new years eve and will have a productive year. To assist with that, I would like to present you with version 2.5 of Behave.&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;Aside from lots of editor polish, particularly around the remote debugger, this version brings interesting compiler optimisations and optional text serialisation of Behave libraries.&lt;/p&gt;
&lt;p&gt;Do note that this upgrades the serialisation version of any Behave libraries touched by 2.5. As with any software upgrade, I advise you to keep a backup or earlier revision of your libraries available before upgrading to 2.5.&lt;/p&gt;
&lt;p&gt;Interestingly, the optimisation work on the compiler also brought with it some internal restructuring. This new structure facilitates even further optimisation work down the road.&lt;/p&gt;
&lt;p&gt;Given the existing zero-allocation, low &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt;, low memory footprint nature of the Behave runtime, it is likely that these optimisations will mean little to a lot of users. Should you, however, be running massive amounts of autonomous agents with Behave, you will likely get some actual bang for the buck here.&lt;/p&gt;
&lt;p&gt;Also in this release are several changes and additions to the runtime, the details of which you will find in the full changelist below.&lt;/p&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;Lots of interesting stuff in the pipeline, with the ground work for much of it already in place. Stay tuned.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.5:
 - Optional text serialisation.
     - Switch between text and binary serialisation in library settings.
     - Full and partial exports to text or binary file.
     - NOTE: Libraries opened in this version of Behave will be upgraded and are afterwards not backwards compatible.
 - Compiler upgrade.
     - Added lots of little CPU and memory optimisations.
     - Added tree analysis leading to larger memory saves on references when possible.
     - Improved handling of circular references.
     - Improved error reporting.
     - Changed name validation.
         - Underscores are no longer allowed in names - in order to avoid name clashes with pathed assets.
         - Fixed previously allowing leading numbers in names.
 - Runtime API.
     - Added library.ReflectForwards (ICollection, object).
     - Added library.SupportedRecords (ICollection).
     - Added blueprint.SupportedTrees.
     - Added Library.DidInstantiate (ICollection / Tree).
     - Changed generated enums to be valued continuously.
     - Changed get calls for unhandled records to now return -1.
 - Editor polish.
     - Improved debugger view.
         - Improved control bar layout.
         - Improved rendering of active referenced trees.
         - Fixes to follow-focus.
         - Debug view no longer re-crops to current visible tree area, preventing the previous behaviour of the view jumping around even without follow-focus enabled.
         - Improved sidebar listing of available- and connected runtimes.
         - Improved handling of disconnecting runtimes.
         - Improved tracking of available runtimes. No more need for refreshing.
         - Improved UI for adding debugger overrides.
         - Added &quot;Add overrides enabled&quot; setting (on by default).
     - Library vertical scrollbar replaced by standalone scroll buttons top / bottom when relevant - reducing visual noise.
     - Smaller tweaks and fixes.
 - Improved internal test coverage.


2.4.2:
 - Fixed some issues related to handling priority selectors in the recently update debugger.


2.4.1:
 - Fix corner case when restructuring library assets.


2.4:
 - Introducing “records”.
     - Float fields stored in “collections” - essentially ‘smart tables’.
     - Blackboard fields.
     - Utility curves.
     - Utility graphs.
     - Behaviour Tree integration.
          - “Tester” component.
          - “Writer” component.
          - Record mode for Priority Selector component.
 - Editor behavioural change: Deleting a tree no longer deletes reference nodes targeting that tree from other trees. Their target is merely cleared.
 - Editor behavioural change: The Reference node is only available in the component bar if the library contains more than one tree. Same behaviour for Tester and Writer with records.
 - Behavioural change: Invert flag is now properly applied by the Priority Selector.
 - Debugger connection stability improvement.
 - Connection disabling has been removed. This confusing feature caused more harm than good.
 - Video player now displays video title and description.


2.3.5:
 - Fix home screen video player.


2.3.4:
 - Better error messages in case of insufficient file access privileges (OHAI Perforce).
 - Added simple version check to the home screen.
 - New icons for Priority Selector and &quot;form new tree&quot;.
 - Smaller, embedded, JSON library.
 - Fix annoying behaviour with tree renaming where text fields would keep last entry.
 - Fix similar behaviour with component text fields on tree selection change.
 - Unity 5 compatibility fixes (tested on beta 2).


2.3.3:
 - Fix focus handling issue with auto-complete.
 - Parametrisation is now correctly applied for reset handler calls.


2.3.2:
 - Fix sidebar item duplication and deletion only functional during rename.


2.3.1:
 - Fix GUI error being logged on tree selection.
 - Proper handling of currently edited library asset being deleted.


2.3:
 - Added support for instant repeaters.
 - Added support for mandatory contexts.
 - Added optional target parameter to Tree.ResetForwards.
 - Added Tree.TickWrapping method.
 - Added debugger auto-launch settings to library build options.
 - Added home screen - shown on launch or via the Help menu, full of resources.
 - Behavioural change: Decorators no longer forward the instant flag of their child node.
 - Behaviour of decorators receiving a Running signal from their control connection is now defined.
 - Dependencies now shipped as separate (replaceable) files for minimal project impact.
 - Editor polish.
     - Added support for running multiple editor debugging instances on one machine.
     - Added focus-follow for debugger and canvas.
     - Added both scrollwheel/pad and drag-to-scroll support to all canvas views.
     - Drag connection to occupied input slot to replace.
     - Directly drag-drop trees from the sidebar onto the canvas as reference nodes.
     - Instant flag doesn't show on nodes connected to parents ignoring the flag.
     - &quot;Last edited library&quot; now tracked per project.
     - Last selected tree is now also restored between sessions and playmode transitions.
     - A bunch of minor adjustments and improvements.
     - Performance + memory + disk space optimisations.
     - Minor bugfixes.
 - New documentation layout and enhancements (already released as available).
 - Reshuffling of code to make way for exciting new things down the road.


2.2.2:
 - Addressed protobuf issue causing Parallel component completion setting to not get stored correctly.


2.2.1:
 - Fixed issue causing parallel components to fail compilation.


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2015-01-01 00:00:00 +0100</published>
				<link>http://www.angryant.com/2015/01/01/Behave-2-5/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.4</title>
				<description>&lt;p&gt;It is finally time for a more substantial update for Behave. With version 2.4, Behave ventures out of its former behaviour tree comfort zone and adds built-in support for utility and blackboard constructs.&lt;/p&gt;
&lt;h2&gt;Records&lt;/h2&gt;
&lt;p&gt;Combined under the label &amp;#8220;Records&amp;#8221;, this expansion adds three primary new library objects:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fields&lt;/li&gt;
	&lt;li&gt;Curves&lt;/li&gt;
	&lt;li&gt;Graphs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Similarly to how behaviour trees can be connected to agent blueprints, records are tied to so called &amp;#8220;collections&amp;#8221;. These are effectively &amp;#8220;smart tables&amp;#8221;, which can be queried (by name) for the value of a specific record &amp;#8211; as well as be asked to set the current value of a record.&lt;/p&gt;
&lt;p&gt;You can either choose to use these collections on their own or directly integrate them with your behaviour trees.&lt;/p&gt;
&lt;p&gt;For more information, see the behave documentation as well as the new Records video.&lt;/p&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;So as you might have guessed, the internal refactoring work mentioned in earlier releases, paved the way for this expansion. However, as per usual, the implementation is somewhat restrained. Any feedback and requests would be most welcome.&lt;/p&gt;
&lt;p&gt;That is not to say that the expansion plans end here, but more on that later.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.4:
 - Introducing “records”.
     - Float fields stored in “collections” - essentially ‘smart tables’.
     - Blackboard fields.
     - Utility curves.
     - Utility graphs.
     - Behaviour Tree integration.
          - “Tester” component.
          - “Writer” component.
          - Record mode for Priority Selector component.
 - Editor behavioural change: Deleting a tree no longer deletes reference nodes targeting that tree from other trees. Their target is merely cleared.
 - Editor behavioural change: The Reference node is only available in the component bar if the library contains more than one tree. Same behaviour for Tester and Writer with records.
 - Behavioural change: Invert flag is now properly applied by the Priority Selector.
 - Debugger connection stability improvement.
 - Connection disabling has been removed. This confusing feature caused more harm than good.
 - Video player now displays video title and description.


2.3.5:
 - Fix home screen video player.


2.3.4:
 - Better error messages in case of insufficient file access privileges (OHAI Perforce).
 - Added simple version check to the home screen.
 - New icons for Priority Selector and &quot;form new tree&quot;.
 - Smaller, embedded, JSON library.
 - Fix annoying behaviour with tree renaming where text fields would keep last entry.
 - Fix similar behaviour with component text fields on tree selection change.
 - Unity 5 compatibility fixes (tested on beta 2).


2.3.3:
 - Fix focus handling issue with auto-complete.
 - Parametrisation is now correctly applied for reset handler calls.


2.3.2:
 - Fix sidebar item duplication and deletion only functional during rename.


2.3.1:
 - Fix GUI error being logged on tree selection.
 - Proper handling of currently edited library asset being deleted.


2.3:
 - Added support for instant repeaters.
 - Added support for mandatory contexts.
 - Added optional target parameter to Tree.ResetForwards.
 - Added Tree.TickWrapping method.
 - Added debugger auto-launch settings to library build options.
 - Added home screen - shown on launch or via the Help menu, full of resources.
 - Behavioural change: Decorators no longer forward the instant flag of their child node.
 - Behaviour of decorators receiving a Running signal from their control connection is now defined.
 - Dependencies now shipped as separate (replaceable) files for minimal project impact.
 - Editor polish.
     - Added support for running multiple editor debugging instances on one machine.
     - Added focus-follow for debugger and canvas.
     - Added both scrollwheel/pad and drag-to-scroll support to all canvas views.
     - Drag connection to occupied input slot to replace.
     - Directly drag-drop trees from the sidebar onto the canvas as reference nodes.
     - Instant flag doesn't show on nodes connected to parents ignoring the flag.
     - &quot;Last edited library&quot; now tracked per project.
     - Last selected tree is now also restored between sessions and playmode transitions.
     - A bunch of minor adjustments and improvements.
     - Performance + memory + disk space optimisations.
     - Minor bugfixes.
 - New documentation layout and enhancements (already released as available).
 - Reshuffling of code to make way for exciting new things down the road.


2.2.2:
 - Addressed protobuf issue causing Parallel component completion setting to not get stored correctly.


2.2.1:
 - Fixed issue causing parallel components to fail compilation.


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2014-11-28 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/11/28/Behave-2-4/</link>
			</item>
			
		
			
			<item>
				<title>Co-very-routine</title>
				<description>&lt;p&gt;I really like coroutines. Like with most things, they should be applied in well-considered quantities, but when applied they can really expand what you can achieve in just a few lines of code. Particularly in our frame-bound world.&lt;/p&gt;
&lt;p&gt;However there has always been this little subset of extra things, which I would have liked to have seen supported by Unity coroutines out of the box.&lt;/p&gt;
&lt;p&gt;&amp;#8220;Hang on, weren&amp;#8217;t you just there?&amp;#8221;&lt;/p&gt;
&lt;p&gt;Yep. I was and terrible as the excuse might be, there was always something that seemed shinier or more on fire.&lt;/p&gt;
&lt;p&gt;Then at &lt;a href=&quot;http://unity3d.com/unite&quot;&gt;Unite 13&lt;/a&gt;, Devin and Matthew of &lt;a href=&quot;http://twistedoakstudios.com/&quot;&gt;Twisted Oak Studios&lt;/a&gt; did an excellent &lt;a href=&quot;https://www.youtube.com/watch?v=ciDD6Wl-Evk&quot;&gt;talk about extending coroutines&lt;/a&gt; by using extension methods to insert a proxy layer between coroutines and the Unity coroutine-system. Unfortunately I didn&amp;#8217;t catch the talk live (I don&amp;#8217;t see many talks at conferences), but shortly after I could catch it on YouTube. Technology, yay!&lt;/p&gt;
&lt;p&gt;In any case that really ended my supply of excuses, other than work.&lt;/p&gt;
&lt;p&gt;Devin and Matthew had specifically implemented the setup to allow coroutines to provide a return value, provide a nicer stopping mechanism, as well as provide a useful way of handling exceptions thrown during the execution of coroutines. This provided an excellent platform to work off and did tick three items off my wishlist, but didn&amp;#8217;t quite deliver the whole package.&lt;/p&gt;
&lt;p&gt;It is an interesting talk and if you have the time, you should give it a look.&lt;/p&gt;
&lt;h1&gt;The Whole Package&lt;/h1&gt;
&lt;p&gt;So I slacked off doing work for a bit and somewhere in Q2 2014 got started writing my own implementation of extended coroutines, with the extra bits and bops on my list.&lt;/p&gt;
&lt;p&gt;This here is the list:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Coroutines providing return values (yay! free!)&lt;/li&gt;
	&lt;li&gt;Handle exceptions thrown during coroutine execution (yay! free!)&lt;/li&gt;
	&lt;li&gt;Useful stopping behaviour (yay! free!)&lt;/li&gt;
	&lt;li&gt;Built-in soft stop.&lt;/li&gt;
	&lt;li&gt;Better built-in communication between caller and coroutine.&lt;/li&gt;
	&lt;li&gt;Easier way of intermixing threading and coroutines.&lt;/li&gt;
	&lt;li&gt;Built-in simple load balancing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Soft Stop&lt;/h2&gt;
&lt;p&gt;Straight up stopping a coroutine is fine, but dependent on what it was doing while being stopped, it might leave a mess behind. The idea with a soft stop mechanism is that in stead of directly stopping the coroutine, the external controller in stead requests that the coroutine stops.&lt;/p&gt;
&lt;p&gt;This allows the coroutine to monitor the state of the requested stop flag at appropriate points in its execution and terminate with the necessary cleanup in response.&lt;/p&gt;
&lt;h2&gt;Caller &amp;#8211; Coroutine Communications&lt;/h2&gt;
&lt;p&gt;But why stop the communications at just requesting a nice stop? What if the work produced by the coroutine could have relevance throughout its execution?&lt;/p&gt;
&lt;p&gt;By making the result of the coroutine accessible before the completion of the coroutine, we gain the capability of not just reading it early on, but also contributing to its building from outside of the coroutine.&lt;/p&gt;
&lt;h2&gt;Threading&lt;/h2&gt;
&lt;p&gt;Sufficiently intense tasks, working on data types not tied to the UnityEngine, &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; can benefit from threading. Unfortunately, most of the time things aren&amp;#8217;t that cleanly cut out, and only part of the task is suitable for threading.&lt;/p&gt;
&lt;p&gt;At that point the alternatives are to either forget about partially threading the task or to bridge the two types of concurrency system. Since the latter rarely turns out very pretty, the former is often chosen.&lt;/p&gt;
&lt;p&gt;Building threading right into the coroutine system makes the choice easy.&lt;/p&gt;
&lt;h2&gt;Simple Load Balancing&lt;/h2&gt;
&lt;p&gt;Finally, heavy tasks which for one reason or another cannot be threaded (perhaps the very nature of the task requires dealing with the UnityEngine &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;), can in stead be frame sliced inside a coroutine.&lt;/p&gt;
&lt;p&gt;However the logic for doing so can be more or less pretty and writing boilerplate is boring. Clearly this would be great to also have built into the base coroutine system.&lt;/p&gt;
&lt;h1&gt;Usage&lt;/h1&gt;
&lt;p&gt;So that is the full wish list implemented. Now let&amp;#8217;s take a look at some quick example snippets.&lt;/p&gt;
&lt;h2&gt;Result&lt;/h2&gt;
&lt;p&gt;The base interface for using the extended coroutines is to start them via the new generic version of &lt;code&gt;MonoBehaviour.StartCoroutine&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For running regular coroutines, the only other difference is that in stead of yielding directly to the return value of &lt;code&gt;StartCoroutine&amp;lt;T&amp;gt;&lt;/code&gt;, you yield to the .Coroutine member of its &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;&lt;/code&gt; return value.&lt;/p&gt;
&lt;p&gt;This is also the reference which gives you access to the result of the coroutine execution.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=Result.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/Result.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Exception&lt;/h2&gt;
&lt;p&gt;Since the coroutine calls are executed by the coroutine system and not the callee, normally exceptions just get swallowed up by the coroutine system and logged out.&lt;/p&gt;
&lt;p&gt;The approach of Devin and Matthew, as implemented here, is to swallow the exception, break coroutine execution and then re-throw the same exception when next the coroutine comes into contact with the caller &amp;#8211; namely when its result is accessed.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=Exception.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/Exception.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Stop&lt;/h2&gt;
&lt;p&gt;In stead of relying on the strange, existing methods of stopping coroutines and the limitations they come with (such as only stopping a coroutine initially started by string parameter or stopping all coroutines on a behaviour), the &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;&lt;/code&gt; reference yields another possibility.&lt;/p&gt;
&lt;p&gt;Since it effectively represents an instance of an executing coroutine, adding a &lt;code&gt;Stop&lt;/code&gt; method to it becomes much more intuitive.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=Stop.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/Stop.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Soft Stop&lt;/h2&gt;
&lt;p&gt;Requesting that a coroutine stops, requires a line of communication between the caller and coroutine. This is provided in the form of the instance of &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;However in order to effectively pass this, the calling convention on the coroutine is slightly different. Rather than passing the return value of the coroutine to &lt;code&gt;StartCoroutine&amp;lt;T&amp;gt;&lt;/code&gt;, the coroutine is passed as a delegate, taking &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;&lt;/code&gt; as its only parameter.&lt;/p&gt;
&lt;p&gt;The rest of the flow is exactly as with &lt;code&gt;Stop&lt;/code&gt;, except &lt;code&gt;RequestStop&lt;/code&gt; is used by the caller and the coroutine periodically checks &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;.ShouldStop&lt;/code&gt;.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=SoftStop.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/SoftStop.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Threading&lt;/h2&gt;
&lt;p&gt;The interface for threading is really very simple. Two new yield classes have been added &lt;code&gt;WaitForWorkerThread&lt;/code&gt; and &lt;code&gt;WaitForMainThread&lt;/code&gt;. Yielding to an instance of either will do exactly as advertised. Yielding break or the result or throwing an exception will terminate the thread and the coroutine.&lt;/p&gt;
&lt;p&gt;When yielding &lt;code&gt;WaitForSeconds&lt;/code&gt; on the worker thread, the thread will sleep for the specified amount of seconds. And finally the &lt;code&gt;CoroutineData&amp;lt;T&amp;gt;&lt;/code&gt; holds a flag accessor to determine the thread state of the coroutine.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=Threading.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/Threading.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Load Balancing&lt;/h2&gt;
&lt;p&gt;Load balancing could be done in a bunch of different ways and I would encourage you to add your own (I would love to see your ideas as well). So I decided to just do the simplest I could think of.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;WaitIfFrameTime&lt;/code&gt; will yield until the next frame if the current frame has taken longer than the specified amount of time. This way it effectively sets down a max frame time while utilising all the time leading up to that cap.&lt;/p&gt;
&lt;script src='https://gist.github.com/.js?file=Load.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.githubusercontent.com/AngryAnt/a9cada6093e7d47bea1c/raw/Load.cs&quot;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Fin&lt;/h1&gt;
&lt;p&gt;And that is it! I hope you find some use of these extensions to the extensions and do let me know if you come up with some cool further extensions.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://gist.github.com/AngryAnt/a9cada6093e7d47bea1c&quot;&gt;Source and examples&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2014-06-20 00:00:00 +0200</published>
				<link>http://www.angryant.com/2014/06/20/Co-very-routine/</link>
			</item>
			
		
			
			<item>
				<title>Construct</title>
				<description>&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt; April 28th: Added illustrations.&lt;/p&gt;
&lt;p&gt;A while ago I &lt;a href=&quot;http://angryant.com/2010/01/05/downloading-the-hydra/&quot;&gt;published a post&lt;/a&gt; referencing &lt;a href=&quot;http://www.imdb.com/title/tt0244244/&quot;&gt;Hollywoods take on programming anno 2001&lt;/a&gt;. It covered how to load additional code into a Unity build at runtime, which can be quite useful for patching, modding and similar post-publishing changes to your build, involving logic changes.&lt;/p&gt;
&lt;p&gt;The post was pretty brief, just covering the raw basics of the technique and not dealing with any of the challenges in integrating it with a more complete patching solution.&lt;/p&gt;
&lt;p&gt;Luckily I have recently had a chance to return to working with it and implementing it fully on a project. This post will cover the challenges met and my solutions to them.&lt;/p&gt;
&lt;p&gt;Unlike the original post, this one is not exactly brief, so, uh, hang on to something?&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;The basic method of integrating new code in an existing Unity runtime is as follows:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Build the patch code to a .net assembly.&lt;/li&gt;
	&lt;li&gt;Load the byte stream of that assembly to an array at runtime.&lt;/li&gt;
	&lt;li&gt;Create a System.Reflection.Assembly instance from the bytes.&lt;/li&gt;
	&lt;li&gt;Instantiate classes, attach components and call methods via reflection.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/1-Assembly.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Assembly process&quot; alt=&quot;Assembly process&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This works really well for simple logic expansions. However if you want to couple the logic update with content such as prefabs and scenes using new components defined in this new assembly, you are out of luck.&lt;/p&gt;
&lt;p&gt;New content can be loaded into Unity runtimes via asset bundles (these require Unity pro at time of writing). However in order to build these asset bundles as well as loading them afterwards, Unity needs to know all the components used in the contained scenes and prefabs.&lt;/p&gt;
&lt;p&gt;Unfortunately this is not possible as that would require the presence of our new MonoBehaviours in the shipped build, which we are obviously not very interested in, given that we are working on a post-shipping patch.&lt;/p&gt;
&lt;p&gt;The challenge is therefore to somehow construct asset bundles which can be built and loaded without the Unity editor or runtime knowing about all the MonoBehaviours used in the bundles.&lt;/p&gt;
&lt;p&gt;Fun, right?&lt;/p&gt;
&lt;h1&gt;Approach&lt;/h1&gt;
&lt;p&gt;Right, getting this one sorted will take a few lines to explain, but let&amp;#8217;s just jump straight into it. The solution I went with goes a little something like this:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Compile bundle scripts to an assembly, from which components are attached in bundle scenes and on bundle prefabs.&lt;/li&gt;
	&lt;li&gt;Before bundle build, pack each of these components into a container component, holding the data and type of the original, replacing it as attached on the same Game Object.&lt;/li&gt;
	&lt;li&gt;When loading the bundle, load the new assembly and then run an unpack step for each container component on each prefab, restoring the original data and references to a newly instantiated component of the correct type, on the same GameObject.&lt;/li&gt;
	&lt;li&gt;When scenes from the bundle are loaded, the same unpacking process runs for each container component in there.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While this does sound very straight forward, there are of-course a few gotchas in there. So let us jump in a bit deeper.&lt;/p&gt;
&lt;h2&gt;Workflow&lt;/h2&gt;
&lt;p&gt;The goal here is to make sure that the programmers, level designers and artists working on new bundles get to maintain as much of their familiar Unity workflow as possible.&lt;/p&gt;
&lt;p&gt;So whatever building and packing solution we set up, the following must still be supported at the very least:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Assets are imported and used in prefabs and scenes as per usual.&lt;/li&gt;
	&lt;li&gt;Scripts are auto-compiled when saved and can be drag-dropped onto Game Objects.&lt;/li&gt;
	&lt;li&gt;Variables and references can easily be tweaked on new bundle components via the inspector.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At first, these workflow requirements do seem to conflict with our technical requirements, given that all code unique to the bundle &lt;em&gt;must&lt;/em&gt; be built into a separate assembly loaded at runtime, rather than be part of the main script compile.&lt;/p&gt;
&lt;p&gt;However where there&amp;#8217;s a will there&amp;#8217;s a way and a tall piles of hacks make for interesting realities.&lt;/p&gt;
&lt;p&gt;In the &lt;a href=&quot;http://angryant.com/videos/&quot;&gt;Unity Hacks talk&lt;/a&gt; I demonstrate how to use an asset post processor to compile java files into a jar plugin automatically. The first step to keeping our workflow without breaking the technical requirements is to copy this, but for C# (and/or JS) files compiled into a .net assembly.&lt;/p&gt;
&lt;p&gt;Rather than spending time going into detail on how you would do that, I point you to the beforementioned talk (and its available example code) as well as the gmcs compiler shipped with the Unity editor. You should be able to construct the flow just fine from that.&lt;/p&gt;
&lt;p&gt;One important note is that the folder from which your asset post processor picks up your scripts should be somewhere in Assets/WebplayerTemplates, as Unity by default will not compile scripts located there into the main project assembly (this is set up to avoid website js getting mixed up for templates).&lt;/p&gt;
&lt;p&gt;I chose a location looking something like this: Assets/WebplayerTemplates/Bundles/MyFirstBundle.&lt;/p&gt;
&lt;p&gt;The asset post processor building the assembly should then drop it in a folder like Assets/Bundles/MyFirstBundle and make a duplicate of it, with the .txt extension.&lt;/p&gt;
&lt;p&gt;The original will be from where you can drag components and the copy will be the one built into the bundle, since it is now imported as a TextAsset and can therefore be included, unlike the original assembly.&lt;/p&gt;
&lt;center&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/2-Workflow.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Workflow&quot; alt=&quot;Workflow&quot; /&gt;&lt;/center&gt;
&lt;p&gt;At this point you can start work on the contents of the bundle, saving scenes, prefabs and other assets unique to the bundle into the same folder as the assembly and text file &amp;#8211; subfolders under that would work fine as well.&lt;/p&gt;
&lt;p&gt;It is important to note that attaching behaviours from the assembly, as well as behaviours defined in the core project to scene objects and prefabs in the bundle is just fine. However prefabs, scenes and scripts outside of the bundle should never reference behaviours or assets from the bundle directly.&lt;/p&gt;
&lt;h2&gt;Building&lt;/h2&gt;
&lt;h3&gt;Core&lt;/h3&gt;
&lt;p&gt;It is worth spending a little bit of time writing an automated build step of the core project, which deletes all the bundle folders before running the actual build. That way you can, after testing, be pretty sure that nothing in the core project inadvertently referenced the contents of a bundle directly.&lt;/p&gt;
&lt;p&gt;Should you feel like wanting a bit earlier warning on something like that, I would recommend spending a bit of time writing an extension checking for such references as scenes are saved and prefabs imported.&lt;/p&gt;
&lt;h3&gt;Bundle&lt;/h3&gt;
&lt;p&gt;The folder created earlier in under Assets/WebPlayerTemplates is only used for storing scripts and building them into assemblies. So at the point of building the assembly, all that matters is the contents of the folder with the resulting assembly, its .txt duplicate and any other assets placed in there.&lt;/p&gt;
&lt;p&gt;Before running the actual bundle build process, we first (as outlined in the Approach) need to pack and remove all instances of MonoBehaviours defined in the bundle assembly.&lt;/p&gt;
&lt;p&gt;First, run through each prefab and scene in the bundle folder and consider each instance of these behaviours.&lt;/p&gt;
&lt;p&gt;For each, attach to the same Game Object an instance of your container component type, defined in the core project &amp;#8211; I am calling it BundledBehaviour in this post.&lt;/p&gt;
&lt;h3&gt;Packing&lt;/h3&gt;
&lt;p&gt;Store the full type name of the original in the BundledBehavior (we will need it to re-instantiate the original when unpacking) and add the two as a pair to a list.&lt;/p&gt;
&lt;p&gt;Next, all serialised fields on the original must be stored in the BundledBehaviour. Iterating over that is a breeze with the SerialisedObject &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Value types can just be straight up serialised to a byte array and chucked onto the BundledBehaviour. For my implementation I chose to use protobuf-net for that, but you can really use whatever meets your fancy.&lt;/p&gt;
&lt;p&gt;Once the value types are dealt with, we should move on to the next behaviour in the list, before handling reference types in a second pass. The reason for this will become apparent when we start dealing with inter-component referencing.&lt;/p&gt;
&lt;center&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/3-Building.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Building and packing&quot; alt=&quot;Building and packing&quot; /&gt;&lt;/center&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;Bam. Done. Wasn&amp;#8217;t that quick? On to the second pass&amp;#8230;&lt;/p&gt;
&lt;p&gt;Reference types get a bit trickier than value types. For each serialised reference, we need to add to a list on the BundledBehaviour an instance of a class pairing the field name and the reference. In the context of this post I will refer to that container class as ReferenceField.&lt;/p&gt;
&lt;p&gt;At this point we unfortunately need to start distinguishing between asset type references, like textures and audio clips, and component type references. Where storing component references in a field of type Component works just fine, unfortunately asset references need to be stored on a field of their exact type.&lt;/p&gt;
&lt;p&gt;I forget the exact reason for the Unity serialisation system working like this, but for the purpose of this post, how about we just file that under &amp;#8220;the law of the land&amp;#8221; and move on?&lt;/p&gt;
&lt;p&gt;The result is that the ReferenceField type will need to have a &amp;#8220;field name&amp;#8221; string field, a &amp;#8220;component reference&amp;#8221; Component field and then an &amp;#8220;X reference&amp;#8221; X field for each asset type X.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/4-Data.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Data storage&quot; alt=&quot;Data storage&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Annoying to deal with, but remember that these are just references, so after having written that list once, the slight overhead and dealing with it in general &amp;#8211; through that wonderful interface you decided to put on it, will carry a minimum of pain.&lt;/p&gt;
&lt;p&gt;When storing component references, do remember to first check if the reference is contained in that list of MonoBehaviour &amp;#8594; BundledBehaviour pairs built earlier. If so, store the a reference to the BundledBehaviour in stead.&lt;/p&gt;
&lt;h3&gt;Finalise&lt;/h3&gt;
&lt;p&gt;Now that all components instances from the bundle assembly have had a BundledBehaviour instance created, containing the type name, value type field data and reference type field references, we can safely go ahead and destroy all the original behaviours.&lt;/p&gt;
&lt;p&gt;Great! Finally before building the actual bundle, a neat trick is to create a little asset bundle manifest &amp;#8211; basically a custom asset type which will be set as the main asset of the bundle, referencing assets we need handy.&lt;/p&gt;
&lt;p&gt;Again, since there is plenty of documentation on how to do that in the &lt;a href=&quot;http://angryant.com/videos/&quot;&gt;Unity Hacks talk&lt;/a&gt;, I would direct you there rather than explain it here.&lt;/p&gt;
&lt;p&gt;The bundle manifest should reference the TextAsset of the bundle assembly (since we need to load that before doing anything else) as well as all the prefabs being built into the assembly.&lt;/p&gt;
&lt;p&gt;Once that is set up, all there is left to do is to initiate the asset bundle build process, specifying the bundle manifest as the main asset, rejoicing that this crazy cabal of hacks somehow worked.&lt;/p&gt;
&lt;center&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/6-Manifest.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Bundle manifest&quot; alt=&quot;Bundle manifest&quot; /&gt;&lt;/center&gt;
&lt;h2&gt;Loading&lt;/h2&gt;
&lt;p&gt;So now we have an asset bundle which we need to somehow magically turn into a whole new self-contained game runtime or whatever it was we put in there.&lt;/p&gt;
&lt;p&gt;First up, via bundle manifest &amp;#8211; accessible as the main asset of the bundle, the bytes of the assembly need to be passed to a System.Reflection.Assembly constructor.&lt;/p&gt;
&lt;p&gt;With that done, all the behaviours defined in the assembly are available for attaching.&lt;/p&gt;
&lt;p&gt;Next, all prefabs should be unpacked first. For each BundledBehaviour attached, run an Unpack function.&lt;/p&gt;
&lt;h3&gt;Unpacking&lt;/h3&gt;
&lt;p&gt;By passing the type name stored on the BundledBehaviour to a GetType call, we can get a reference to the original type, which we can pass to AddComponent, creating a new instance of the original. Store this pairing between BundledBehaviour and new instance in a list &amp;#8211; just like during the packing process.&lt;/p&gt;
&lt;p&gt;Once available deserialise the simple fields, as stored in byte form on the BundledBehaviour, onto the new instance.&lt;/p&gt;
&lt;p&gt;For each asset reference in the list of ReferenceFields, copy over the reference to the correct field on the new instance.&lt;/p&gt;
&lt;p&gt;As with the packing process, dealing with reference type fields should be pushed to a second pass &amp;#8211; once all instances of the original types are available.&lt;/p&gt;
&lt;center&gt;&lt;img src=&quot;/resources/posts/2014-04-25-Construct/5-Unpack.png&quot; style=&quot;float:none;clear:both;&quot; title=&quot;Loading and unpacking&quot; alt=&quot;Loading and unpacking&quot; /&gt;&lt;/center&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;We can now pass over all BundledBehaviour previously treated and copy all references stored in the list of ReferenceFields to the members with the proper names &amp;#8211; as specified in the same.&lt;/p&gt;
&lt;p&gt;When copying over a reference, check first if it is one of our BundledBehaviour instances and if so, copy over the new instance it is paired with in stead.&lt;/p&gt;
&lt;p&gt;With all original data and references restored, all instances of BundledBehaviour on the prefabs can now be destroyed.&lt;/p&gt;
&lt;h3&gt;Scenes&lt;/h3&gt;
&lt;p&gt;Scenes can now be loaded normally from the bundle, since all prefabs have now been properly unpacked. BundledBehaviour should in its Awake handler start the same unpacking process used on the prefabs, so that loading a scene automatically unpacks it.&lt;/p&gt;
&lt;p&gt;Violá! New inter-depended content and logic is now live in your runtime!&lt;/p&gt;
&lt;h1&gt;Recommendations and Limitations&lt;/h1&gt;
&lt;p&gt;Seeing as the BundledBehaviours are using Awake, that basically rules out behaviours depending on one-another during Awake. Not to worry though, you still have OnEnable and Start for initialisation. Just keep it in mind.&lt;/p&gt;
&lt;p&gt;Depending on your use case for this, you might end up with an interesting web of different versions of bundles loaded on any given client machine. I would therefore recommend not spending time and resources on building a dependency tree between bundles and in stead strictly forbid one bundle using components defined in another. Additionally it would be a good idea to designate one namespace per bundle.&lt;/p&gt;
&lt;p&gt;As mentioned in the original post, this whole trick depends on the mono &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; runtime being available. That means no fun for you if you are targeting iOS or the consoles &amp;#8211; at time of writing, those are the platforms on which Unity employs &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; rather than &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt;.&lt;/p&gt;
&lt;h1&gt;Security&lt;/h1&gt;
&lt;p&gt;Before we run out and celebrate our great fortune, a word on security: Since a likely application for this technique is to load self-contained bundles over the internet, remember that a third party could potentially insert themselves mid-stream and modify the contents of your transmission.&lt;/p&gt;
&lt;p&gt;If we were just transmitting textures and meshes, that should be just fine, but in this instance we are transmitting executable code which we intend to run in our application.&lt;/p&gt;
&lt;p&gt;So it would probably be a good idea to somehow guard against someone inserting malicious code in there. At the very least you should employ some public key signing of the bundles &amp;#8211; optimally doing the whole transfer on a secured connection (whatever that means these days).&lt;/p&gt;
&lt;p&gt;And that is about it. A fair bit of text, but I hope you found some use in this postmortem-ish post. I had fun writing it at least :)&lt;/p&gt;</description>
				<published>2014-04-25 00:00:00 +0200</published>
				<link>http://www.angryant.com/2014/04/25/Construct/</link>
			</item>
			
		
			
			<item>
				<title>The Engine Wars: Numbers</title>
				<description>&lt;p&gt;So this years &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; did indeed not disappoint &amp;#8211; lots of great talks, meetings and announcements. Thanks for saying hi if you did &amp;#8211; if not, maybe next year. Of the announcements, I would like to just focus on the engine ones here.&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;Unity 5 was announced with a great feature set, Unreal 4 was released to the public on an attractive subscription license (including full source) and the same for CryEngine (though no source).&lt;/p&gt;
&lt;p&gt;This heavy escalation of the engine wars means that now more than ever, the choice of tech to startups and indies is about tech rather than numbers.&lt;/p&gt;
&lt;p&gt;However the numbers are not exactly transparent or directly comparable and not all information is out there yet (especially for CryEngine). I have done my best to collect the available information, but please let me know if something is off or missing.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;CryEngine is now available (no source) for indies at 9.9 $/€ per seat, per month.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;Unreal4 is available (source included) at $19 per seat, per month, plus 5% revenue share on gross sales (meaning you get 65% payout from iOS sales in stead of 70% for instance).&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li&gt;Unity5 has no change in its licensing model (providing more options, also rendering it more confusing) &amp;#8211; it has a free version (some features locked away), a rental and an up-front model &amp;#8211; no revenue share or source on any of them. One core difference in the rental model for Unity is that you always bind for 12 months.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The balance of the new CryEngine and Unreal offers in general over Unity is that most of the cost can be deferred to after sales, where Unity in general is up-front payment.&lt;/p&gt;
&lt;h1&gt;Comparison&lt;/h1&gt;
&lt;p&gt;In the form below you can adjust number of seats, duration of production and expected gross sales to see how this will affect the product prices. Note that the rows starting with &amp;#8220;+&amp;#8221; are added to the base cost.&lt;/p&gt;
&lt;style&gt;
&lt;p&gt;.calculated td
	{
		font-size: 10pt;
		padding: 10px;
		white-space: nowrap;
	}
	.calculated td.header
	{
		font-size: 10pt;
		padding: 10px;
		color: #0083C3;
		white-space: nowrap;
	}&lt;/p&gt;
&lt;/style&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Seats&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Duration (months)&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Gross sales&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;input type=&quot;text&quot; id=&quot;seats&quot; value=&quot;4&quot; onchange=&quot;update ()&quot; /&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type=&quot;text&quot; id=&quot;duration&quot; value=&quot;10&quot; onchange=&quot;update ()&quot; /&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type=&quot;text&quot; id=&quot;sales&quot; value=&quot;500000&quot; onchange=&quot;update ()&quot; /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table class=&quot;calculated&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tr&gt;
		&lt;td&gt;&lt;/td&gt;
		&lt;td class=&quot;header&quot;&gt;CryEngine &lt;sup class=&quot;footnote&quot; id=&quot;fnr1&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td class=&quot;header&quot;&gt;Unity5&lt;/td&gt;
		&lt;td class=&quot;header&quot;&gt;Unity5 pro&lt;/td&gt;
		&lt;td class=&quot;header&quot;&gt;Unity5 sub&lt;/td&gt;
		&lt;td class=&quot;header&quot;&gt;Unreal4 &lt;sup class=&quot;footnote&quot; id=&quot;fnr4&quot;&gt;&lt;a href=&quot;#fn4&quot;&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;Base&lt;/td&gt;
		&lt;td formula=&quot;9.9 * seats * duration&quot;&gt;&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td formula=&quot;1500 * seats&quot;&gt;&lt;/td&gt;
		&lt;td formula=&quot;75 * seats * ceiling (duration, 12)&quot;&gt;&lt;/td&gt;
		&lt;td formula=&quot;19 * seats * duration + sales * 0.05&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ Android&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td formula=&quot;1500 * seats&quot;&gt;&lt;/td&gt;
		&lt;td formula=&quot;75 * seats * ceiling (duration, 12)&quot;&gt;&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ iOS &lt;sup class=&quot;footnote&quot; id=&quot;fnr2&quot;&gt;&lt;a href=&quot;#fn2&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td formula=&quot;1500 * seats&quot;&gt;&lt;/td&gt;
		&lt;td formula=&quot;75 * seats * ceiling (duration, 12)&quot;&gt;&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ WinPhone 8&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ Blackberry&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ Web/GL&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ PS4 &lt;sup class=&quot;footnote&quot; id=&quot;fnr2&quot;&gt;&lt;a href=&quot;#fn2&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;Call Sony &lt;sup class=&quot;footnote&quot; id=&quot;fnr5&quot;&gt;&lt;a href=&quot;#fn5&quot;&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;Call Sony &lt;sup class=&quot;footnote&quot; id=&quot;fnr5&quot;&gt;&lt;a href=&quot;#fn5&quot;&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ XboxOne &lt;sup class=&quot;footnote&quot; id=&quot;fnr2&quot;&gt;&lt;a href=&quot;#fn2&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
		&lt;td class=&quot;header&quot;&gt;+ WiiU &lt;sup class=&quot;footnote&quot; id=&quot;fnr2&quot;&gt;&lt;a href=&quot;#fn2&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
		&lt;td&gt;N/A&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;$0&lt;/td&gt;
		&lt;td&gt;Call us &lt;sup class=&quot;footnote&quot; id=&quot;fnr3&quot;&gt;&lt;a href=&quot;#fn3&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;script&gt;update ();&lt;/script&gt;&lt;p class=&quot;footnote&quot; id=&quot;fn1&quot;&gt;&lt;a href=&quot;#fnr1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; : On CryEngine:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;While &amp;#8220;Base&amp;#8221; means Linux, Mac and Windows for the others, CryEngine does not support Mac and Linux.&lt;/li&gt;
	&lt;li&gt;Not a lot of details are available on licensing at this time.&lt;/li&gt;
	&lt;li&gt;It would seem that the as-a-service model has a company income limit &amp;#8211; similar to Unity free being unavailable for $100k+ companies.&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn2&quot;&gt;&lt;a href=&quot;#fnr2&quot;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; : iOS and consoles require registering with platform owner&lt;/p&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn3&quot;&gt;&lt;a href=&quot;#fnr3&quot;&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt; : “Call us” most likely means old-school licensing as in up-front large cash payment / larger rev-share or a mix.&lt;/p&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn4&quot;&gt;&lt;a href=&quot;#fnr4&quot;&gt;&lt;sup&gt;4&lt;/sup&gt;&lt;/a&gt; : Keep in mind that since revenue share for Unreal4 is taken of gross, any publisher or investor deal involving revenue share will relatively scale your effective cost of the engine share.&lt;/p&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn5&quot;&gt;&lt;a href=&quot;#fnr5&quot;&gt;&lt;sup&gt;5&lt;/sup&gt;&lt;/a&gt; : Sony has not promised outright to cover license expenses like Microsoft and Nintendo, but are likely to.&lt;/p&gt;
&lt;p&gt;Also keep in mind that none of the providers are closed to the idea of doing tailored quotes on bulk or custom deals. This post is mostly intended for startups and indies who generally would not receive such quotes.&lt;/p&gt;
&lt;h1&gt;Sources&lt;/h1&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.cryengine.com/news/crytek-announces-its-cryengine-as-a-service-program&quot;&gt;http://www.cryengine.com/news/crytek-announces-its-cryengine-as-a-service-program&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://store.unity3d.com/products/pricing&quot;&gt;https://store.unity3d.com/products/pricing&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blogs.unity3d.com&quot;&gt;http://blogs.unity3d.com&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://www.unrealengine.com/register&quot;&gt;https://www.unrealengine.com/register&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope you find this useful and again &amp;#8211; this is what I could find. Do please let me know if something is missing or off.&lt;/p&gt;</description>
				<published>2014-03-25 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/03/25/The-Engine-Wars-Numbers/</link>
			</item>
			
		
			
			<item>
				<title>GDC 14: The Quest For Fun</title>
				<description>&lt;p&gt;Next week is that wondrous time of &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; again and boy am I looking forward to saying hi to old friends, meeting new ones and absorbing some great talks.&lt;/p&gt;
&lt;p&gt;Unlike my previous visits however, this time I attend representing not an employer, but myself as a freelancer. Freelancing in Q3 and 4 of 2013 was filled with lots of fun and great challenges, so my mission at this years &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; will be to build my schedule to make 2014 at least as much fun.&lt;/p&gt;
&lt;p&gt;For more information on my freelancing services and references, please see the &lt;a href=&quot;/freelance&quot;&gt;Freelance&lt;/a&gt; and &lt;a href=&quot;/work&quot;&gt;Work&lt;/a&gt; pages.&lt;/p&gt;
&lt;p&gt;If you have a task or project you think we could do some good work on together / want to talk about Behave for a bit or just say hi, please do not hesitate to give me a ping.&lt;/p&gt;
&lt;p&gt;Shortly after arrival I will pick up a prepaid &lt;span class=&quot;caps&quot;&gt;SIM&lt;/span&gt;, so I am reachable via &lt;a href=&quot;http://twitter.com/AngryAnt&quot;&gt;Twitter&lt;/a&gt; or the &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; app PM system.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll also be co-hosting the &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; Unity and AI &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt; meetings Wednesday (&lt;a href=&quot;http://schedule.gdconf.com/session-id/828274&quot;&gt;Unity &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt;&lt;/a&gt;) and Friday (&lt;a href=&quot;http://schedule.gdconf.com/session-id/828292&quot;&gt;AI &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt;&lt;/a&gt;). Do stop by if you have an interest in either of those topics.&lt;/p&gt;
&lt;p&gt;In any case, if you&amp;#8217;re attending &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; I hope you have a good time &amp;#8211; I know I plan to.&lt;/p&gt;</description>
				<published>2014-03-13 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/03/13/GDC-14-The-Quest-For-Fun/</link>
			</item>
			
		
			
			<item>
				<title>Moving in Unity</title>
				<description>&lt;p&gt;&lt;strong&gt;Updated March 8th&lt;/strong&gt;: Added a few more details on mapping to navmesh and extrapolating the root motion vector.&lt;/p&gt;
&lt;p&gt;Moving something around on the screen in Unity is really not that hard. The point of this post is therefore not to introduce you to how this is accomplished, but rather to point out where you&amp;#8217;re doing it wrong&amp;#8482;.&lt;/p&gt;
&lt;p&gt;Generally Unity moves objects using one of three systems:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Direct transform manipulation.&lt;/li&gt;
	&lt;li&gt;Physics.&lt;/li&gt;
	&lt;li&gt;Navigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the end, movement is measured on transform updates. I make the distinction from the point of view of where you provide the input. Technically you could argue that animation should be up there as well, but I choose to lump that in with transform manipulation, since disabling the application of movement by the animation system has no other side effects.&lt;/p&gt;
&lt;p&gt;As a side-note, since 4.3 it is possible to partially or completely disable having the animation system update the transform hierarchy.&lt;/p&gt;
&lt;h1&gt;Transform&lt;/h1&gt;
&lt;p&gt;So long as the goal is simply to move an object and nothing else, modifying the values of the transform component, or using its various useful methods to do so, is all you need.&lt;/p&gt;
&lt;p&gt;This includes directly animating the transform via the animation window or by enabling animation root motion.&lt;/p&gt;
&lt;p&gt;However chances are that your situation is more complex than this and you would do well to read on.&lt;/p&gt;
&lt;h1&gt;Physics&lt;/h1&gt;
&lt;p&gt;When your object in any way needs to affect and/or be affected by the physics simulation, you need to make some extra considerations. Simply slapping on a collider and calling it a day will ruin your next.&lt;/p&gt;
&lt;p&gt;To properly participate as a dynamic part of the physics simulation, an object needs to have a rigidbody component attached somewhere in its transform hierarchy.&lt;/p&gt;
&lt;p&gt;The physics system considers separate transform hierarchies as separate objects, so one (and only one) rigidbody component will mark the rest of its hierarchy as dynamic.&lt;/p&gt;
&lt;p&gt;Multiple rigidbodies in the same hierarchy leads to undetermined behaviour (read: weirdnessness) &amp;#8211; the only exception being if those rigidbodies are connected by a joint &amp;#8211; thus making their behaviour again well defined.&lt;/p&gt;
&lt;p&gt;To clarify, this does not apply to sibling hierarchies, but strictly scenarios where tracing from one rigidbody, through to the hierarchy root, encounters another rigidbody.&lt;/p&gt;
&lt;p&gt;In general, many systems &amp;#8211; both built in and third party &amp;#8211; rely on dynamic objects being separate transform hierarchies. Building with such a design is both safe and recommended practice.&lt;/p&gt;
&lt;h2&gt;Kinematic&lt;/h2&gt;
&lt;p&gt;&amp;#8220;But I don&amp;#8217;t need gravity or forces or all that other nonsense!&amp;#8221; &amp;#8211; be cool, that is what the &amp;#8220;kinematic&amp;#8221; switch is for. This basically tells the physics simulation that your object is dynamic, but you will take care of all its movement.&lt;/p&gt;
&lt;p&gt;Kinematic rigidbodies will not be affected by forces or collisions, but will collide with non-kinematic rigidbodies, sending collision events and pushing them out of the way (assuming there are colliders present somewhere in the transform hierarchy of the object).&lt;/p&gt;
&lt;p&gt;&amp;#8220;So why add the rigidbody in the first place? Things work just fine without!&amp;#8221; &amp;#8211; if you have Unity pro, I would direct your attention at the profiler as you move about &amp;#8211; if not, take my word for it that it is not a joyous sight.&lt;/p&gt;
&lt;p&gt;Any object (unique transform hierarchy) with no rigidbody present is treated by the physics simulation as static. For optimal performance, all static colliders are baked into a static collision geometry, securing optimal performance when doing collision checks.&lt;/p&gt;
&lt;p&gt;However every time one static collider (note that this has nothing to do with the static flags on the GameObject &amp;#8211; just the presence of absence of a rigidbody on the object in question) is moved, the whole static collision geometry is marked dirty and regenerated.&lt;/p&gt;
&lt;p&gt;This is not a terribly costly operation, so moving pieces of level geometry from one position to another from time to time is fine. However moving a character of one or more static colliders around every frame will cost you.&lt;/p&gt;
&lt;p&gt;Note that while moving by directly modifying the transform of a kinematic rigidbody is just fine, you will get better results for rapid movement by using the MovePosition and MoveRotation rigidbody functions.&lt;/p&gt;
&lt;p&gt;The former will effectively &amp;#8220;teleport&amp;#8221; the physical object &amp;#8211; fine for short distances and minor rotations, but less so for longer moves. MoveRotation and -Position effectively &amp;#8220;drags&amp;#8221; the object from A to B.&lt;/p&gt;
&lt;h2&gt;Kine-not-so-matic&lt;/h2&gt;
&lt;p&gt;&amp;#8220;Ok, so maybe it would pretty useful if my character could walk into walls, get pushed by others and that sort of thing&amp;#8230;&amp;#8221; No problem. Disable the kinematic flag and start moving via the rigidbody component. If you wanted proper forces and all that, I&amp;#8217;m sure you&amp;#8217;re already all over the AddForce function and friends.&lt;/p&gt;
&lt;p&gt;However if you still want strict control &amp;#8211; just with a touch of presence &amp;#8211; you should look at directly setting the velocity property of the rigidbody.&lt;/p&gt;
&lt;p&gt;Given sideways and forward movement input, forming a velocity vector is easy. By setting the velocity of the rigidbody you add that information to the physics simulation as well as tell it to update the position of the object smoothly.&lt;/p&gt;
&lt;p&gt;That includes pushes from other rigidbodies or pushbacks from static geometry. However directly setting the velocity will override any directional change and so momentum will remain unchanged.&lt;/p&gt;
&lt;p&gt;Therefore consider factoring in some acceleration when building your target velocity vector &amp;#8211; for a more natural look after your character is pushed or makes an abrupt change of direction.&lt;/p&gt;
&lt;h1&gt;Navigation&lt;/h1&gt;
&lt;p&gt;Parallel to the physics simulation you find the navigation runtime. Similarly to how the rendered world model is defined by static and dynamic geometry and the physics world model is defined by static colliders and rigidbodies, the navigation world model is defined by interconnected navigation mesh and dynamic obstacles.&lt;/p&gt;
&lt;p&gt;While the static physics geometry defines areas of no access, navigation mesh defines areas which &lt;strong&gt;are&lt;/strong&gt; navigable. This information is used for finding a valid path from point A to B, but more importantly it is used to constrain characters and inform them of their surroundings.&lt;/p&gt;
&lt;p&gt;The physics simulation can be used for this as well and traditionally is. However the data covered by the physics system is vastly more complex and its ability to define traversable space is a side effect of its ability to define non-traversable space.&lt;/p&gt;
&lt;p&gt;This is where you end up spending way too much time blocking off sections of scenery and later testing that there are indeed no holes in that. Navmeshes on the other hand define a surface on which characters of a given height and with a given radius can move.&lt;/p&gt;
&lt;h2&gt;NavMeshAgent&lt;/h2&gt;
&lt;p&gt;Similarly to the rigidbody component, the NavMeshAgent component wires an object to the navigation runtime. In stead of the single kinematic switch, however, the NavMeshAgent has separate updatePosition and updateRotation toggles.&lt;/p&gt;
&lt;p&gt;To get things going, you can either set a path by one of the many accessors for that or directly set the velocity. Assuming that the NavMeshAgent is configured to update the position, this will start smoothly moving the object like with the rigidbody &amp;#8211; only this time constrained by the navigation meshes rather than collision geometry.&lt;/p&gt;
&lt;p&gt;In addition to pathfinding and staying on the navigation mesh, the navigation runtime will also attempt to have the various NavMeshAgents avoid one-another by adjusting velocity based on the position and velocity of nearby dynamic obstacles and NavMeshAgents.&lt;/p&gt;
&lt;p&gt;Avoidance can be completely tweaked though &amp;#8211; so that one NavMeshAgent can ignore it completely or itself be ignored or weigh different NavMeshAgents differently.&lt;/p&gt;
&lt;h2&gt;Direct control&lt;/h2&gt;
&lt;p&gt;&amp;#8220;Pathfinding? I just need to move this character around based on input.&amp;#8221; Sure, fine &amp;#8211; that is where you just go set the velocity of the NavMeshAgent rather than trying to set a path or destination for it.&lt;/p&gt;
&lt;p&gt;Like with the rigidbody, this starts moving the NavMeshAgent smoothly and tells the runtime about its current velocity &amp;#8211; giving other agents a chance to avoid. Note that even if you do not let the NavMeshAgent directly control the position of your character, you should still feed the velocity back to it &amp;#8211; in order to keep the avoidance runtime up to date.&lt;/p&gt;
&lt;h1&gt;Animation&lt;/h1&gt;
&lt;p&gt;&amp;#8220;&lt;span class=&quot;caps&quot;&gt;WAT&lt;/span&gt;! You did not count this as one of the three ways of moving stuff!&amp;#8221; &amp;#8211; nop, quite right. However root motion is awesome, so let&amp;#8217;s briefly touch on how we tie that to the other systems for much greatness.&lt;/p&gt;
&lt;p&gt;While most of what the animation system does is not of too much concern for your movement logic, one very useful feature is. By analysing animations on import, the surface movement relevant for those animations is calculated and later blended as the animations are blended.&lt;/p&gt;
&lt;p&gt;By default the animation system will, with root motion enabled, move an animated object around by directly updating the transform position based on the root motion of the currently playing animation blend. Animation nicely synchronised with world movement.&lt;/p&gt;
&lt;h2&gt;I&amp;#8217;ll root my own motion, thank you&lt;/h2&gt;
&lt;p&gt;However while that looks mighty cool, it really isn&amp;#8217;t very considerate of your carefully crafted physics simulation or your neatly marked navigation runtime. Luckily it does give an in by allowing you to override the actual application of the root motion.&lt;/p&gt;
&lt;p&gt;This is accomplished by, on the same game object as your animator component, attaching a script implementing the method OnAnimatorMove. Once that method is defined, the animation system will no longer directly apply root motion and in stead call this implementation post-evaluation.&lt;/p&gt;
&lt;p&gt;In the implementation of the OnAnimatorMove callback, you could then update a target velocity vector by simply dividing animator.deltaPosition by Time.deltaTime and similarly rotation. And once we have desired movement in the form of a velocity vector, plenty of the earlier described scenarios become relevant.&lt;/p&gt;
&lt;h2&gt;Most interactive niceness&lt;/h2&gt;
&lt;p&gt;&amp;#8220;Great, I&amp;#8217;ll take one of each!&amp;#8221; Sure, no problem. Well&amp;#8230; It&amp;#8217;s not exactly straight forward, but it is indeed possible to combine all of these things to get something that is responsive, embedded in your simulations and looks great.&lt;/p&gt;
&lt;p&gt;The chain of data goes a little something like this:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Player controlled characters:
	&lt;ol&gt;
		&lt;li&gt;Feed input to the animator, resulting in nicely blended animations and root motion.&lt;/li&gt;
		&lt;li&gt;Generate a target velocity in OnAnimatorMove.&lt;/li&gt;
		&lt;li&gt;Set velocity of NavMeshAgent (configured to not update position or rotation).&lt;/li&gt;
		&lt;li&gt;Set velocity and rotation of non-kinematic rigidbody (properly constrained on rotation so it doesn&amp;#8217;t tip over).&lt;/li&gt;
		&lt;li&gt;Map transform position to navigation mesh via NavMesh.SamplePosition.&lt;/li&gt;
	&lt;/ol&gt;&lt;/li&gt;
	&lt;li&gt;Non-player characters or indirectly controlled player characters:
	&lt;ol&gt;
		&lt;li&gt;Set destination or path of NavMeshAgent.&lt;/li&gt;
		&lt;li&gt;Feed desiredVelocity of NavMeshAgent to animator.&lt;/li&gt;
		&lt;li&gt;Repeat as for player controlled characters from 2.&lt;/li&gt;
	&lt;/ol&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What this setup does not give you is responsiveness to being bumped into. However velocity-wise this is not something your movement implementation should handle directly unless you are ok with breaking that nice root motion setup you just established.&lt;/p&gt;
&lt;p&gt;In stead I would recommend using queries on the surrounding physics and navigation environment to inform the animation state machine of special conditions like &amp;#8220;player wants to go full speed, but there&amp;#8217;s a wall two units from here&amp;#8221; and handle slowing down, stopping and similar in there where the result will look good.&lt;/p&gt;
&lt;p&gt;One simple trick is to do a navigation raycast along the forward vector of the moving transform for some amount of look-ahead distance and if a navigation mesh edge is hit and do a physics raycast further forward from a point slightly elevated from that edge hit point.&lt;/p&gt;
&lt;p&gt;With that setup you can very simply gather information about where the character is headed &amp;#8211; if into a steep wall or perhaps to a ledge or obstacle which could be leapt.&lt;/p&gt;
&lt;h1&gt;Unity Hacks&lt;/h1&gt;
&lt;p&gt;Since apparently I lumped just about everything into that project, unsurprisingly the Unity Hacks project has some work on this form of wired up movement. Particularly the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Movement/Mover.cs&quot;&gt;Mover&lt;/a&gt; component attempts to create a system-agnostic movement interface as well as some simple movement on networked setups not covered here.&lt;/p&gt;
&lt;p&gt;While not complete or in any way a final answer, I hope that with the information provided here, it turns out useful for you.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Movement/Mover.cs&quot;&gt;Mover.cs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2014-03-07 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/03/07/Moving-in-Unity/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.3</title>
				<description>&lt;p&gt;In good time for &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt;, I present version 2.3 of Behave. Not exactly the rapid January release I had hoped for &amp;#8211; admittedly I got a bit carried away. However that just means more goodies for everyone :)&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;Highlights from the changelist below:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Great new behaviour for Repeaters and decorator components in general.&lt;/li&gt;
	&lt;li&gt;Mandatory contexts.&lt;/li&gt;
	&lt;li&gt;Useful runtime &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; tweaks.&lt;/li&gt;
	&lt;li&gt;A good, thick coat of editor polish.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A word of caution on the new instant repeater: It &lt;strong&gt;will&lt;/strong&gt; very easily send you into an infinite loop if you are not watching out. Just in case you by accident set one up, the compiler will warn about this potential scenario.&lt;/p&gt;
&lt;p&gt;For this release, the AngryAnt community has again provided great bug reports and many suggestions for changes and additions. Thanks! I hope you enjoy this release &amp;#8211; do let me know in either case.&lt;/p&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;As noted in the release notes, a good deal of time was spent refactoring while working on this release. This puts me on a good path for some exciting additions later on.&lt;/p&gt;
&lt;p&gt;However with &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; right around the corner, I will likely have to reduce my velocity on Behave a bit. So let&amp;#8217;s keep this new stuff as a surprise for later. No need for letting out all the spoilers now, right?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.3:
 - Added support for instant repeaters.
 - Added support for mandatory contexts.
 - Added optional target parameter to Tree.ResetForwards.
 - Added Tree.TickWrapping method.
 - Added debugger auto-launch settings to library build options.
 - Added home screen - shown on launch or via the Help menu, full of resources.
 - Behavioural change: Decorators no longer forward the instant flag of their child node.
 - Behaviour of decorators receiving a Running signal from their control connection is now defined.
 - Dependencies now shipped as separate (replaceable) files for minimal project impact.
 - Editor polish.
     - Added support for running multiple editor debugging instances on one machine.
     - Added focus-follow for debugger and canvas.
     - Added both scrollwheel/pad and drag-to-scroll support to all canvas views.
     - Drag connection to occupied input slot to replace.
     - Directly drag-drop trees from the sidebar onto the canvas as reference nodes.
     - Instant flag doesn't show on nodes connected to parents ignoring the flag.
     - &quot;Last edited library&quot; now tracked per project.
     - Last selected tree is now also restored between sessions and playmode transitions.
     - A bunch of minor adjustments and improvements.
     - Performance + memory + disk space optimisations.
     - Minor bugfixes.
 - New documentation layout and enhancements (already released as available).
 - Reshuffling of code to make way for exciting new things down the road.


2.2.2:
 - Addressed protobuf issue causing Parallel component completion setting to not get stored correctly.


2.2.1:
 - Fixed issue causing parallel components to fail compilation.


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2014-02-27 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/02/27/Behave-2-3/</link>
			</item>
			
		
			
			<item>
				<title>Unity and .net assemblies</title>
				<description>&lt;p&gt;Since I started making middleware for Unity in early 2008, I have been working with Unity and .net assemblies. I have in this time had many opportunities to juggle the two in many different contexts, so I figured a sort of summary of what I learned would make sense.&lt;/p&gt;
&lt;p&gt;Why not start off by setting a few facts straight, eh?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Aside from the extension and a header, .net assemblies have little to do with Windows Dynamic Link Libraries.
	&lt;ul&gt;
		&lt;li&gt;Windows DLLs contain binary code, usually with a very simple interface, while .net assemblies contain .net bytecode (or &lt;span class=&quot;caps&quot;&gt;CIL&lt;/span&gt;).&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Unity pro is not required to use .net assemblies.
	&lt;ul&gt;
		&lt;li&gt;Binary plugins require Unity pro (at time of writing) and must be placed in Assets/Plugins. However .net assemblies are just bytecode &amp;#8211; just like what Unity turns your scripts into, so none of these requirements apply.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;.net assemblies run on all platforms &amp;#8211; including webplayer.
	&lt;ul&gt;
		&lt;li&gt;Again, as we are talking about bytecode which is fed directly to the mono runtime &amp;#8211; like the compiled result of your scripts, the same rules go.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Distributing .net assemblies in stead of script files does not copy protect your code.
	&lt;ul&gt;
		&lt;li&gt;Since the mono runtime has to Just In Time compile your assembly to run on the current platform, the bytecode is quite verbose and while some information is lost, generally it is very easy to decompile and read .net assemblies.&lt;/li&gt;
		&lt;li&gt;Remember that this is true for your script source in most project builds as well, since for most platforms Unity builds your scripts to .net assemblies.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Argh! But my kodes!&lt;/h1&gt;
&lt;p&gt;I will not get into source protection too much, but generally I would not worry too much about it.&lt;/p&gt;
&lt;p&gt;Source code in and of itself does not mean that someone can instantly copy and use parts of your work. It takes actual skill and time investment to make use of it, integrated in a different setup from what it was originally designed for. In the end it is my opinion that it would not be worth it compared to doing the same work from scratch.&lt;/p&gt;
&lt;p&gt;Consider that the entire source of Half Life 2 was very publicly leaked shortly before its originally scheduled release and how we are all now drowning in games based on it.&lt;/p&gt;
&lt;p&gt;If you have client-side security measures which you would like to protect &amp;#8211; like in-app purchases or other anti-cheat measures, you may indeed want to consider splitting out and encrypting part of this logic as well as applying some measure of source obfuscation.&lt;/p&gt;
&lt;p&gt;A word of caution: While source-level obfuscation is fine and usually sufficient, assembly-level obfuscation can be risky as it generally relies on bugs in the mono runtime in order to function. Bugs which might get fixed at any time &amp;#8211; at which point you will need to go back and revisit your security efforts.&lt;/p&gt;
&lt;p&gt;And remember: Encryption and obfuscation is just about making it harder for people to do things you don&amp;#8217;t want them to. In the end this all has to be understood by processors and even binaries are routinely reverse engineered. The best security is gained by not making what you wish to protect available outside of hardware in your control.&lt;/p&gt;
&lt;p&gt;For more information on protecting sensitive client-side information from tampering, see the Unite Asia 2013 &amp;#8220;Protecting Your Android Content&amp;#8221; talk by Erik Hemming.&lt;/p&gt;
&lt;p&gt;Note that Unity does not distribute .net assemblies on all platforms. Some platforms do not run the mono &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; compiler because reasons and for those Unity will in stead perform Ahead Of Time compilation on your code while building.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; compilation basically means that in stead of relying on the &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; compiler to at runtime load your bytecode when relevant and compile it for the specific hardware it is running on, the &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; compiler will compile all your assembly to platform-specific binary right up front.&lt;/p&gt;
&lt;p&gt;This means that your source code assemblies, any assemblies present in your project as well as the Unity engine assemblies are all jumbled into one binary. In most cases this should disincentivise tampering sufficiently.&lt;/p&gt;
&lt;p&gt;At time of writing, Unity employs &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; compiling on iOS and the console platforms.&lt;/p&gt;
&lt;h1&gt;What is the point then?&lt;/h1&gt;
&lt;p&gt;Now that you know what assemblies are not, you might be wondering why you should be interested in them at all. And rightly so.&lt;/p&gt;
&lt;p&gt;I think it is always healthy to have some understanding of what goes on in the lower layers of your technology stack, but most Unity developers will not need to know about .net assemblies.&lt;/p&gt;
&lt;p&gt;However here are some reasons why they are really cool:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;If you are distributing middleware, they allow you to significantly reduce your distribution footprint without compromising your development environment (one assembly vs. a bunch of script files).
	&lt;ul&gt;
		&lt;li&gt;Like their Windows cousins, .net assemblies allow embedded resources, which means you can literally put everything you need &amp;#8211; textures, audio, whatever &amp;#8211; inside one file.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Where &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; is available, new assembly can be loaded at runtime.
	&lt;ul&gt;
		&lt;li&gt;So what? So live patching baby!&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since the &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; compiler routinely loads bytecode from disk and compiles and executes it, there is nothing preventing you from having it load bytecode which was not included in your original build.&lt;/p&gt;
&lt;p&gt;The class System.Reflection.Assembly lets you load in bytecode from a file or a byte array, after which you can use reflection to find and instantiate types, call functions and all that other good stuff on what is contained in the assembly.&lt;/p&gt;
&lt;p&gt;Remember that since Unity employs &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; and not &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; on some platforms, this functionality is not available everywhere.&lt;/p&gt;
&lt;p&gt;For an example of loading in new assembly, see the code-in-asset-bundles example from the &amp;#8220;Unity Hacks&amp;#8221; talk available on the &lt;a href=&quot;/videos&quot;&gt;videos&lt;/a&gt; page (source included).&lt;/p&gt;
&lt;p&gt;A word of caution: If you plan on employing remote patching, make sure to at least sign your transfers in order to avoid man in the middle injection attacks.&lt;/p&gt;
&lt;h1&gt;Wohoo! Assemble all of the things!&lt;/h1&gt;
&lt;p&gt;This is all great, but how do you get started building assemblies for all them things? Well, dear reader, there are different approaches:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;If you are already set up with Visual Studio or Mono Develop, you can simply create a new project for a .net assembly using the project creation wizard. In order to access Unity types, simply add the UnityEngine.dll (and if necessary the UnityEditor.dll) assemblies to the project references and off you go.&lt;/li&gt;
	&lt;li&gt;Should you be of a different persuasion and if you are not one to shy away from a terminal window, you can use the the gmcs binary as distributed with Unity or the mono &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; to build your assembly by command-line.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Either of these will produce a .dll file with all of your kodes (and potentially resources). Simply drop it anywhere in your assets folder to gain access to the contained classes. The same compile order rules which apply to scripts, also hold true for assemblies.&lt;/p&gt;
&lt;p&gt;Any public ScriptableObject or MonoBehaviour derived classes will appear as children of the assembly asset. Simply click the folding widget next to the asset in order to view and be able to drag-drop them.&lt;/p&gt;
&lt;p&gt;Ah and if you were too lazy to check out the Unity Hacks talk (you really should, it is full of useful snippets), the trick for putting code in asset bundles is to compile the scripts to an assembly rather than letting Unity compile them and then save the assembly in your assets folder with the .bytes extension rather than .dll.&lt;/p&gt;
&lt;p&gt;This makes Unity import the assembly as a TextAsset which is not addressed by Unitys compiler and can be included in asset bundles. At runtime, the bytes property of the asset reference is then passed to the Assembly constructor as described earlier.&lt;/p&gt;
&lt;h1&gt;And the catch?&lt;/h1&gt;
&lt;p&gt;Given that we are reaching the end of this article, that would mean it is high time for some dream bursting. This all sounds very easy and optimal to work with, but of-course it is not that simple.&lt;/p&gt;
&lt;p&gt;While Unity makes it fairly straight forward to debug your scripts using MonoDevelop, it will by default do absolutely nothing to help you with your assemblies.&lt;/p&gt;
&lt;p&gt;To help it on its way, you need to first build your assemblies for debug and secondly copy the generated [AssemblyName].mdb file to your assets folder along side the .dll file.&lt;/p&gt;
&lt;p&gt;If you went ahead and looked for the mdb file right as I had ended the above paragraph, you would stand some chance of not finding it. Should you be on Windows, a pdb file rather than an mdb is generated and it is absolutely useless to the Unity debugging runtime.&lt;/p&gt;
&lt;p&gt;Should you be stuck with a pdb file, you will need to use the pdb2mdb command-line tool as distributed with the Unity mono runtime or the mono &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt;. However running this command by hand every time you need to debug gets old really fast, so I recommend adding it in as a post-build step on your MonoDevelop or VisualStudio project.&lt;/p&gt;
&lt;p&gt;For more information on debugging assemblies in Unity and indeed general use of assemblies in Unity, see this excellent article in the Unity documentation: &lt;a href=&quot;http://docs.unity3d.com/Documentation/Manual/UsingDLL.html&quot;&gt;Using Mono DLLs in a Unity Project&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And that is all, folks. I hope you find it useful!&lt;/p&gt;</description>
				<published>2014-01-03 00:00:00 +0100</published>
				<link>http://www.angryant.com/2014/01/03/Unity-and-net-assemblies/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.2</title>
				<description>&lt;p&gt;It is finally here! Sorry about this release taking a bit longer than the prior ones. I have experienced the very luxurious &amp;#8220;problem&amp;#8221; of &lt;a href=&quot;/work/&quot;&gt;having lots to do&lt;/a&gt;. The last contract of the year finished this Friday though, so here we are: 2.2 :)&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;While the full changelist will follow the body of this post as per usual, I would still like to draw out a few of the main changes in 2.2:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.&lt;/li&gt;
	&lt;li&gt;Rather than waiting for the Unity bugfix, the built-in compiler &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; is now bypassed in favour of direct compiler binary execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Watch out for that behavioural change &amp;#8211; it will very likely break code. I decided on this in order to reduce the size of your obligatory agent code. Additional parameters have been moved onto properties of the sender tree.&lt;/p&gt;
&lt;p&gt;The compiler change means we are finally rid of that annoying requirement of having mono installed next to Unity in order to run the Behave compiler. Yay!&lt;/p&gt;
&lt;p&gt;The remaining changes are more or less just heaps of UI- and workflow polish, plus a few bug fixes &amp;#8211; again, many thanks to the AngryAnt community for providing invaluable assistance in identifying and tracking these down.&lt;/p&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;Early next year I hope to have some more time for Behave, allowing me to do some rapid releases with new features in January. As always, any feedback you might have is very much appreciated.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:


2.2:
 - Behavioural change: Support for multiple different action handler signatures is discontinued effective immediately.
    - Generated agent blueprint as well as accepted reflected signatures are now only:
        - public BehaveResult [Tick/Init][Name]Action (Tree sender);
        - public void Reset[Name]Action (Tree sender);
 - Added Tree class accessors - all valid only during an active init/tick/reset handler call:
    - string ActiveStringParameter
    - float ActiveFloatParameter
    - IAgent ActiveAgent
    - object ActiveData
 - Rather than waiting for the Unity bugfix, the built-in compiler API is now bypassed in favour of direct compiler binary execution.
    - An additional system-level mono SDK install is no longer needed to work around this Unity bug.
 - Tree.SetForward now returns boolean success value rather than logging error when passed unused action.
 - Full-library export now also available from the library settings in stead of menu-only access.
 - Even more UI polish: Better word-wrap, more contrasts for emphasis, instant flag hidden in unaffected scenarios and much more.
 - &quot;Form new tree&quot; nicely moves the new subtree up around the root socket rather than retaining the old position.
 - Default frame-rate of DebugUpdater now set to 20 fps rather than every frame. Gun safety and all that.
 - Massive codegen size save for larger libraries - from optimisation of tree-agent introspection codegen. Compile-time win.
 - More rigid parameter evaluation (remove needless occasional extra codegen).
 - Fixed copy and duplication procedures incorrectly not copying parameter values.
 - Force Unity to write serialised data before compiling.


2.1.1:
 - Fixed issue with tree paramterisation breaking debugger visualisation.


2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
    - No more collections - for nesting, use paths in tree names.
    - New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
    - Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2013-12-23 00:00:00 +0100</published>
				<link>http://www.angryant.com/2013/12/23/Behave-2-2/</link>
			</item>
			
		
			
			<item>
				<title>ReView</title>
				<description>&lt;p&gt;Earlier this week ReView, a small Unity editor extension of mine, went live on the Unity Asset Store.&lt;/p&gt;
&lt;p&gt;The story behind it is simply that I was getting tired of adjusting layouts all the time &amp;#8211; as my tooling needs changed between authoring something in edit mode and testing it in play mode. The closest thing to something built-in addressing this would be the &amp;#8220;maximise on play&amp;#8221; feature. However that is basically only useful for demoing.&lt;/p&gt;
&lt;p&gt;So I wrote ReView. It lets you define two window layouts &amp;#8211; just like any other Unity window layout &amp;#8211; with the key difference being that you append &amp;#8220;-edit&amp;#8221; to one and &amp;#8220;-play&amp;#8221; to another. Once you switch to the one relevant for your current mode, ReView will then automatically switch to its counterpart when you enter or exit playmode.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;/tools&quot;&gt;More info and video&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5B5&quot;&gt;ReView on the Asset Store&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2013-10-11 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/10/11/ReView/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.1</title>
				<description>&lt;p&gt;A little over a month ago &lt;a href=&quot;http://angryant.com/2013/08/25/Behave-2-0/&quot;&gt;I shipped Behave 2&lt;/a&gt; after having spent quite a while rewiring a lot of the core of the project. Today you get to see even more benefit of this work as already I am ready with version 2.1.&lt;/p&gt;
&lt;p&gt;I would like to take this opportunity to thank the members of the AngryAnt community who have been a great help in identifying bugs I had not found and properly corner those I had.&lt;/p&gt;
&lt;h2&gt;Contents&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2013-10-06-Behave-2-1/Parameter.png&quot; alt=&quot;&quot; /&gt;
While the full changelist will follow the body of this post as per usual, I would still like to draw out a few of the main changes in 2.1:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Auto complete on contexts, action names and string parameters makes for faster editing and helps guard against typos.&lt;/li&gt;
	&lt;li&gt;Partial library export and import-to-library makes moving trees between projects a breeze.&lt;/li&gt;
	&lt;li&gt;Parameterised trees increase tree re-usability even more by exposing select node settings as tree parameters, tweak-able per reference.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Onwards&lt;/h2&gt;
&lt;p&gt;While 2.1 brings great additions to the solid feature set of Behave 2, I am far from done.&lt;/p&gt;
&lt;p&gt;I realise that many currently still on the fence with regards to upgrading from 1.x have asked for more in terms of examples and demos and I will do my best to get to that as soon as possible.&lt;/p&gt;
&lt;p&gt;As always, I greatly appreciate any feedback you might have.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/&quot;&gt;Project information&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
Changelist:

2.1:
 - Added autocomplete on action names, string parameters and component contexts.
 - Added mandatory actions (present in library regardless of use in trees).
 - Added partial library export and library merging / import-to-library.
 - Added Behave stripping - leave behind only a very lean Behave runtime, for redistribution or super slim deploy.
 - Added parameterised trees - get even more re-use out of your trees by overriding context and variables per reference.
 - Behavioural change: Tree.Reset will now delay resetting tree variables until after complete component reset.
 - Behavioural change: Tree.Tick will no longer automatically reset the tree upon completion. This plays very well with:
 - Added Tree.TickContinuously (int iterationCap = 1024) - ticks tree till completion or iteration cap is reached.
 - Added BehaveResult Tree.Result (bool value) utility function to side with Tree.Invert (BehaveResult value).
 - Added int Debugging.Local.ConnectionCount property - facilitating debug behaviour dependent on Behave debugger presence.
 - Moved default install path from Assets/Behave to Assets/Plugins/Behave.
    - WARNING: See Readme.txt upgrade guide.
 - Fixed decorator control node removal resulting in detached control connection.
 - Fixed decorator incorrectly not forwarding the instant status of its child node.
 - Fixed scenario where agent classes would get reflected for handlers even if blueprint derived.
 - Fixed unexpected corner cases of bad library configuration failing compiles (now causing warnings or simply being ignored).
 - Fixed Behave window breaking down when exiting play mode after having been active there.
 - Fixes to context getting incorrectly reset in some scenarios.
 - Fixed copy / paste functionality missing in some text fields.
 - Lots of UI polish and minor fixes.


2.0:
 - New editor.
    - Unified all controls into one window.
    - Completely customised look - compatible with both Unity light and dark skin.
    - Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
    - Remote debugging.
    - Tick and reset.
    - &quot;Unplug&quot; for debugger-only control.
    - Breakpoints.
    - Action overrides - override the return values of specified actions.
 - Decorator rewrite.
    - Deprecated old decorator.
       - Still compiles, but cannot be added.
    - Decorators are now control-type components.
       - No specific decorator handlers on agents.
       - Control is achieved via third connection socket.
    - Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
 	- No more collections - for nesting, use paths in tree names.
 	- New serialization format - see Readme.txt for upgrade instructions.
    - Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
    - int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
    - enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
    - enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
    - int Tree.ActiveContext { get; }
 - Changed IAgent interface:
    - Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
    - Trees -&amp;gt; TreeType.
    - Actions -&amp;gt; ActionType.
    - Decorators -&amp;gt; DecoratorType.
    - Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
    - int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
    - bool IsAction (int) -&amp;gt; static bool IsAction (int)
    - bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
    - public BehaveResult Init[Name][Action/Decorator] (Tree sender);
    - public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
    - public void Reset[Name][Action/Decorator] (Tree sender);
    - public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
    - Component bar.
    - Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
    - When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
    - When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
    - Behaviour tree decorators.
    - Stand-alone edition of the Behave editor.
    - Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
    - Not able to delete collections from library.
    - Not able to delete trees from library.
    - Not able to rename collections from library.
    - Not able to rename trees from library.
    - Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.
&lt;/pre&gt;</description>
				<published>2013-10-06 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/10/06/Behave-2-1/</link>
			</item>
			
		
			
			<item>
				<title>Behave 2.0</title>
				<description>&lt;p&gt;In 2010 the Unity Asset Store launched with an editor extension already live. That extension was Behave 1. Three years later, after way too long a pause, I have finally gotten around to releasing version 2.0 of Behave.&lt;/p&gt;
&lt;p&gt;As you might have noticed, especially lately, I have had quite a few things going on &amp;#8211; not the least of which is my recent exit from Unity Technologies and entry into freelancing. This all meant not a lot of time for Behave.&lt;/p&gt;
&lt;p&gt;So anyway, this is what I was doing when I was not writing that Unity Hacks blog post you were waiting for.&lt;/p&gt;
&lt;h2&gt;Behave&lt;/h2&gt;
&lt;p&gt;If you have no idea what Behave is and don&amp;#8217;t feel like dropping by the &lt;a href=&quot;/behave&quot;&gt;subsection on this site&lt;/a&gt; dedicated to it, here is how it is defined on the Asset Store:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Behave is a system for designing, integrating and running behaviour logic using Behaviour Trees. At its core Behave has a drag-drop designer and a highly effective and flexible compiled runtime.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;No funky runtime data formats or interpretation. Designer &amp;#8594; Compiler &amp;#8594; Your code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;What is the use of a workflow extension without proper rapid iteration tools? Connect the visual debugger with break, step, reset, breakpoints and overrides directly to your project in the editor or on your target device.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: An introductory video to Behave 2 is now available:&lt;/p&gt;
&lt;p&gt;&lt;iframe width=&quot;600&quot; height=&quot;400&quot; src=&quot;//www.youtube.com/embed/vcsFjM-cw9k&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;Future&lt;/h2&gt;
&lt;p&gt;Part of the challenge with any project is always to fight feature creep. This was very much also the case with Behave 2, so don&amp;#8217;t worry &amp;#8211; I have plenty of improvements to come. Not saying that this build is broken though &amp;#8211; go get it!&lt;/p&gt;
&lt;h2&gt;License&lt;/h2&gt;
&lt;p&gt;Unlike Behave 1, version 2 is a paid package. Aside from having gone freelance and needing a financial basis to keep up support for the software, this also had to be done as the Asset Store long ago banned the use of custom licenses.&lt;/p&gt;
&lt;p&gt;This, of-course posed a bit of a problem for Behave 1&amp;#8217;s default &amp;#8220;free if you show the splash&amp;#8221; license. Fortunately the Asset Store team members are merciful gods and I got a veeery long grace period to beat Behave into compliance.&lt;/p&gt;
&lt;p&gt;Included in the license is also access to a private community and internal support resources &amp;#8211; including the beta list.&lt;/p&gt;
&lt;h2&gt;Launch&lt;/h2&gt;
&lt;p&gt;For a limited time after launch, Behave 2 will be available at a flat discount of 50%. Additionally, if you happen to bump into me at Unite 2013 in Vancouver next week, you can slip me your business card and partake in the draw for one of &lt;strong&gt;three free Behave 2 licenses&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you already purchased a copy of Behave 2 and win a free copy, I&amp;#8217;ll refund you the purchase amount.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Details of the Unite license draw are available &lt;a href=&quot;/unite2013&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Changes&lt;/h2&gt;
&lt;p&gt;So if you are a Behave 1 user and you are wondering what exactly is under the hood, I included the full Behave changelog below.&lt;/p&gt;
&lt;p&gt;Now you might go &amp;#8220;1.5? What the hell? Did I miss something?&amp;#8221;. No you did not. That version unfortunately did not ship, but was in stead rolled straight into 2.0. But hey, water and bridges, right? 2.0 is here baby!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://u3d.as/5hA&quot;&gt;Behave 2 for Unity on the asset store&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;Changelist:

2.0:
 - New editor.
	- Unified all controls into one window.
	- Completely customised look - compatible with both Unity light and dark skin.
	- Keyboard authoring interface in addition to drag &amp;amp; drop.
 - Debugger upgrade.
	- Remote debugging.
	- Tick and reset.
	- &quot;Unplug&quot; for debugger-only control.
	- Breakpoints.
	- Action overrides - override the return values of specified actions.
 - Decorator rewrite.
	- Deprecated old decorator.
	   - Still compiles, but cannot be added.
	- Decorators are now control-type components.
	   - No specific decorator handlers on agents.
	   - Control is achieved via third connection socket.
	- Two initial decorator types: Repeater and Interrupter.
 - Asset restructuring.
	- No more collections - for nesting, use paths in tree names.
	- New serialization format - see Readme.txt for upgrade instructions.
	- Collections are gone. Use Unix-style path names for tree organisation.
 - IAgent.Tick (Tree, bool) changed to IAgent.Tick (Tree)
	- Init calls can now only be handled explicitly
 - Full coverage online documentation and other community resources.
 - Countless fixes and polish items.

1.5:
 - Added Tree.TickActive - indicating if a tree is currently executing a tick or if it has completed evaluation.
 - In-tick tree reset requests now result in a reset at the end of tree evaluation rather than an immediate one.
 - Removed the legacy compatibility assembly (for compatibility with pre-1.2 assets) from the default distribution.
 - Fixed &quot;X must be instantiated using the ScriptableObject.CreateInstance method instead of new X&quot; warnings.

1.4:
 - Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.
 - Fixed debugger view dependency on active tree editor - causing reported null reference exception.
 - Fixed missing scrollbars on browser window.
 - Reduced logging noise from debug builds.
 - Agent blueprints can now be MonoBehaviour based.
 - Clarified wording on &quot;library not loaded&quot;.
 - Now handling reset a bit cleverer - potential performance boost.
 - Changed the default success criteria of Parallel components from SuccessOrFailure to Success.
 - Added &quot;instant&quot; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &quot;instant&quot; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.
 - The compiler progress bar returns.
 - Editing a Behave asset now focuses the asset browser last instead of the tree editor.
 - Behave can now be installed in any subfolder of Assets - provided its internal folder structure remains intact.
 - Compilation speed improvements.
 - Enabled references across collection borders.
 - Added Tree.DataSize - returning the number of bytes used by a tree instance. This is also displayed in the debugger window.

1.3:
 - Fixed priority selector init flag resetting.
 - Fixed reference handling on tree renaming and deletion.
 - Fixed references still pointing at old collection post collection duplication.
 - Fixed compilation of actions and decorators with non-integral float parameters.
 - Fixed GUI list behaviours.
 - Fixed passing context back and forth between referenced trees and referrer.
 - Fixed reordering connections not causing save state to be set.
 - Various GUI tweaks.
 - Runtime optimisations.
 - Enabled scrolling of the tree list in the debugger window.
 - Exposed Tree.ReflectForwards.
 - Added Tree.ResetForwards.
 - Added agent blueprints - connecting to agent handlers through virtual methods rather than reflected handlers.
 - Made connections selectable in the tree editor via the connection nub.
 - Moved connection managing from the inspector to the tree editor, where it is more visible and handy.
 - Added support for disabling connections - for faster, less destructive debugging.
 - Double-click reference component to jump to referenced tree.
 - Changed &quot;Cannot update unregistered tree&quot; handling from an exception to an error message. Still need more info.
 - Now showing string and float parameters in the tree editor if either is set.

1.2:
 - Fixed release building.
 - Added the priority selector, introducing the API points:
	- int IAgent.SelectTopPriority (Tree sender, params int[] IDs);
	- enum BL[LibraryName].PriorityType { PriorityName, ..., Unknown };
 - Added support for branch contexts, introducing the API points:
	- enum BL[LibraryName].ContextType { ContextName, ..., Unknown };
	- int Tree.ActiveContext { get; }
 - Changed IAgent interface:
	- Tick (bool init, Tree sender) -&amp;gt; Tick (Tree sender, bool init)
 - Added &quot;Select asset&quot; button to the standard inspector.
 - Interface polish.

1.1:
 - Made compatible with Unity 3.0 - including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.
 - UI tweaks and polish.
 - Added the option to have return values of nodes be inverted.
 - Fixed compiler bug when facing sequence or selector with only one child node.
 - Renamed Library.Tree -&amp;gt; Library.InstantiateTree.
 - Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.
 - Removed the abstract Library class.
 - Changed generated library class:
	- Trees -&amp;gt; TreeType.
	- Actions -&amp;gt; ActionType.
	- Decorators -&amp;gt; DecoratorType.
	- Tree InstantiateTree (int, IAgent) -&amp;gt; static Tree InstantiateTree (TreeType, IAgent)
	- int TreeID (Tree) -&amp;gt; static TreeType Type (Tree)
	- bool IsAction (int) -&amp;gt; static bool IsAction (int)
	- bool IsDecorator (int) -&amp;gt; static bool IsDecorator (int)
 - Upped editor performance.
 - New asset structure change with automatic import of Behave 1.0 assets.
 - Changed action and decorator handlers. These are now the handlers mapped:
	- public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
	- public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
	- public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);
	- public BehaveResult Init[Name][Action/Decorator] (Tree sender);
	- public BehaveResult Tick[Name][Action/Decorator] (Tree sender);
	- public void Reset[Name][Action/Decorator] (Tree sender);
	- public BehaveResult [Name][Action/Decorator] {get; set;}
 - Added support for collection duplication.
 - Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.
 - Debugger now renders active sub-trees as well.

1.0:
 - Lots o fixes for Unity 2.5 compatibility.
 - Closer editor integration with new UI.
	- Component bar.
	- Node inspection.
 - Runtime tree debugging.
 - Direct mapping of action and delegate handlers via reflection.
 - Kitty demo.

0.3b:
 - Various tweaks to the editor UI.
 - Optimised the compiler.
 - Fixed the following editor bugs from the bug list:
	- When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour.
	- When a compile fails, the Behave compiler is locked and unusable – requiring a unity relaunch.
 - Implemented the following wishlist items:
	- Behaviour tree decorators.
	- Stand-alone edition of the Behave editor.
	- Behaviour tree debugging features.

0.2b:
 - Made the demo project a whole lot more interesting.
 - Implemented the editor wish list item: Ability to move trees between collections.
 - Various tweaks to the editor UI.
 - Fixed a ton of bugs in the compiler.
 - Fixed the following editor bugs from the bug list:
	- Not able to delete collections from library.
	- Not able to delete trees from library.
	- Not able to rename collections from library.
	- Not able to rename trees from library.
	- Missing &quot;tree has been changed, save changes?&quot; dialog.

0.1b:
 - Some documentation is available.
 - Compiler is now creating sensible output.
 - A simple test tree and script using it is provided with the demo.
 - Documentation is linked directly from the unity help menu.
 - Less spamming of the log with debug information.

Pre-release:
 - Magic happened. Behave was born.&lt;/pre&gt;</description>
				<published>2013-08-25 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/08/25/Behave-2-0/</link>
			</item>
			
		
			
			<item>
				<title>Unity Hacks: Dual sticks</title>
				<description>&lt;p&gt;This is my third post in what looks like is going to turn into &lt;a href=&quot;http://angryant.com/2013/07/19/Unity-Hacks-Touch-gestures/&quot;&gt;a series&lt;/a&gt;, examining parts of the example project I provided for the Unity Hacks presentation &amp;#8211; delivered at a couple of the Unite conferences this year.&lt;/p&gt;
&lt;p&gt;You can find the project and a recording of the presentation in the &lt;a href=&quot;/videos&quot;&gt;videos&lt;/a&gt; section of this site.&lt;/p&gt;
&lt;h1&gt;DualControls&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/DualControls.cs&quot;&gt;DualControls&lt;/a&gt; interface has a very straight forward purpose: Provide a 2 &amp;#215; 2 axis input interface across platforms and compatible units. This is exposed via the DualControls.Left and DualControls.Right accessors &amp;#8211; each returning a Vector2.&lt;/p&gt;
&lt;p&gt;Supported out of the box is:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;WASD&lt;/span&gt; + mouse.&lt;/li&gt;
	&lt;li&gt;Xbox360 controller (windows-only)&lt;/li&gt;
	&lt;li&gt;ps3 controller (OS X-only)&lt;/li&gt;
	&lt;li&gt;Shadowgun-style touch controls (left/right screen split)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However abstraction is relaxed enough that virtual sticks or alternative input like the leap motion could be added fairly easily (assuming you have a means of capturing that input data in the first place).&lt;/p&gt;
&lt;h1&gt;Controllers&lt;/h1&gt;
&lt;p&gt;So controllers are not exactly nicely wrapped up in the current version of Unity. Which ungodly hack did I have to apply to get them to play along with just working out of the box in an easily installable package? It is actually not so bad. However I had to concede to some compromises up front. Basically when it comes to joysticks and controllers, you generally have two complications: the hardware itself and the driver.&lt;/p&gt;
&lt;p&gt;So? What is so bad about that? Well, in a perfect world you had one driver for each controller type or at least all the drivers for the same hardware would map the buttons and axes in the same way, right?&lt;/p&gt;
&lt;p&gt;Enter: This world. For every controller you always have at least two drivers set up differently: One for OS X and one for Windows (the Linux one often being based on the Windows one as I understand it). Why would anyone be content with just two drivers though? There exists a good number of different packages and open source solutions, vendor and OS provided drivers for the different controllers.&lt;/p&gt;
&lt;p&gt;The way these are differentiated in the Unity runtime is via the joystick name string &amp;#8211; as accessible via Input.GetJoystickNames.&lt;/p&gt;
&lt;p&gt;This is what &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/DualControls.cs&quot;&gt;DualControls&lt;/a&gt; checks for in its Update handler. If a new joystick is found connected, it runs the name by the controller wiring and activates the appropriate controller (optionally if accepted by a callback).&lt;/p&gt;
&lt;p&gt;Per default I have compromised and only provided wiring for the Xbox360 controller on Windows and the ps3 controller on OS X. This particular configuration stems from the fact that those OS&amp;#8217;es ship with a pre-installed default driver for those controllers.&lt;/p&gt;
&lt;p&gt;Microsoft clearly should support their own hardware and I&amp;#8217;m assuming that Apple just supports the ps3 controller because it&amp;#8217;s hardware from a direct Microsoft competitor.&lt;/p&gt;
&lt;p&gt;However, again, the abstraction is loose enough that if you want to, you should be able to add support for more controllers fairly easily. See the end of the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/Controllers.cs&quot;&gt;Controllers.cs&lt;/a&gt; script for that.&lt;/p&gt;
&lt;p&gt;Oh, but I almost forgot the hack: As I am using the standard Unity Input &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; for this, the input manager needs configuring, right? So with no &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; for it, how do you go about doing that for a package?&lt;/p&gt;
&lt;p&gt;You use the AssetDatabase &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; to load ProjectSettings/InputManager.asset and then the ScriptableObject &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; to modify it.
&lt;script src='https://gist.github.com/6151366.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I hope you find this useful. For more details, these are the Unity Hacks scripts related to this post:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/DualControls.cs&quot;&gt;DualControls.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/DualControls.Stick.cs&quot;&gt;DualControls.Stick.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/Controllers.cs&quot;&gt;Controllers.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/ControllerInput.cs&quot;&gt;ControllerInput.cs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


</description>
				<published>2013-08-04 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/08/04/Unity-Hacks-Dual-sticks/</link>
			</item>
			
		
			
			<item>
				<title>Unity Hacks: Cameras</title>
				<description>&lt;p&gt;In my &lt;a href=&quot;http://angryant.com/2013/07/19/Unity-Hacks-Touch-gestures/&quot;&gt;effort to pick apart&lt;/a&gt; the &amp;#8220;Unity Hacks&amp;#8221; project as made available, along with a recording of the presentation, in the &lt;a href=&quot;/videos&quot;&gt;videos&lt;/a&gt; section, I now focus on the camera system.&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;Like the other new components I was preparing for the new standard assets, a key part of this setup is modularity and versatility. This is why I from the start chose to have camera handling values maintained via the transform tree &amp;#8211; as opposed to maintaining internal values to overwrite the transform values when updated.&lt;/p&gt;
&lt;p&gt;This way, not only can camera logic be broken down into several components which can be optional or replaced, but co-operation between the camera system, animations and any other systems which could apply relative transformation, is much easier.&lt;/p&gt;
&lt;p&gt;As this approach would be placing a certain requirement on the transform tree structure surrounding the camera in any case, I opted to go for greatest amount of possible detail vs. smallest impact. The structure therefore requires a three layers deep transform tree.&lt;/p&gt;
&lt;p&gt;The root of the tree is designated the horizontal hinge. It takes care of movement in all three dimensions as well as rotation on the horizontal plane. The immediate child of this transform is referred to as the vertical hinge. This transform is expected to not move and will have its position reset every frame to enforce this. In stead, the vertical hinge is only responsible for rotation on the vertical plane.&lt;/p&gt;
&lt;p&gt;The final transform, the child of the vertical hinge, is expected to not rotate and only move on its relative z-axis. This effectively makes it the zoom component of the rig. The GameObject of this transform is the one holding the camera component.&lt;/p&gt;
&lt;h1&gt;DualHingeCamera&lt;/h1&gt;
&lt;p&gt;Maintaining and abstracting this setup is the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/DualHingeCamera.cs&quot;&gt;DualHingeCamera&lt;/a&gt; component. With reference to the different transforms of the rig, this component maintains the setup by apply three targets: targetOffset, targetHorizontalRotation and targetVerticalRotation. These are set by controller scripts and applied via constrained speed and offset variables.&lt;/p&gt;
&lt;p&gt;Vertical rotation is clamped and damped by the verticalSpan animation curve variable. As explained in the presentation, the time value of the most extreme animation keys specify the vertical angles (relative to a vector pointing backwards from the rig root) at which vertical rotation is clamped.&lt;/p&gt;
&lt;p&gt;The height of the curve at any point specifies the scale of the update speed &amp;#8211; as the camera moves through that angle and further towards the end of the half of the curve it is on. As in: If the angle is above the middle of the vertical span and the camera is moving further up, speed is scaled according to the curve, but if it is moving down then no scale is applied. The inverse if of-course true as well. The effect, assuming the curve is not flat, is a smooth limit rather than a hard clamp.&lt;/p&gt;
&lt;h1&gt;Control&lt;/h1&gt;
&lt;p&gt;The base for any of the example camera behaviours supplied with the project is the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/CameraBehaviour.cs&quot;&gt;CameraBehaviour&lt;/a&gt; component. This supplies wrapping of access to the DualHingeCamera, as well as a bit of default handling &amp;#8211; such as automatically updating the camera activity tracking when the camera moves. It also offers up the MoveCamera method as a common interface for input scripts to apply movement instructions.&lt;/p&gt;
&lt;p&gt;One of the most simple examples of a camera behaviour is the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/OrbitCamera.cs&quot;&gt;OrbitCamera&lt;/a&gt;. This camera simply takes the movement instructions (a Vector2) and apply them to the target horizontal and vertical rotation. The result is the familiar behaviour of being able to rotate around a subject, while rotating up and down within the clamped span.&lt;/p&gt;
&lt;p&gt;There are several more camera behaviours in the project (which you should take a look at) and they are demonstrated in an example scene as well as within the presentation. However as a last example, I want to point out the &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/TravelCamera.cs&quot;&gt;TravelCamera&lt;/a&gt; component. Unlike the others, this does not inherit from CameraBehaviour &amp;#8211; nor does it directly affect its rotation or position. In stead, it holds a simple piece of logic which enables and disables other behaviours, based on input activity. The result should be a behaviour somewhere between that seen in Journey and that of the Assassins Creed games.&lt;/p&gt;
&lt;p&gt;I tried to keep this post short, but I hope you still find this useful and decide to build on the system. In any case, here are direct links to the resources covered in the post:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/DualHingeCamera.cs&quot;&gt;DualHingeCamera.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/CameraBehaviour.cs&quot;&gt;CameraBehaviour.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/OrbitCamera.cs&quot;&gt;OrbitCamera.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Camera/TravelCamera.cs&quot;&gt;TravelCamera.cs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


</description>
				<published>2013-07-28 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/07/28/Unity-Hacks-Cameras/</link>
			</item>
			
		
			
			<item>
				<title>Unity Hacks: Touch gestures</title>
				<description>&lt;p&gt;So earlier this month I could finally push the Unity Hacks example code and slide show project &lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/&quot;&gt;live&lt;/a&gt; &amp;#8211; after one of the &lt;a href=&quot;/videos&quot;&gt;videos&lt;/a&gt; of the presentation was pushed live.&lt;/p&gt;
&lt;p&gt;The project is a pretty big treasure trove of handy scripts though and I didn&amp;#8217;t like just tossing it out there and let people pick it apart on their own(feel free to go excavating if you learn better that way though). Therefore I plan for the next couple of posts here to cover various bits and bops from that project.&lt;/p&gt;
&lt;p&gt;Note that a bunch of these scripts &amp;#8211; for instance the one I cover today &amp;#8211; was at the time I was still at Unity Technologies slated for the new Standard Assets shipped with Unity. Since I left, I obviously can&amp;#8217;t say if or when these are shipped and in which form. What&amp;#8217;s in the Unity Hacks project is pretty much the last iteration I did on them before leaving.&lt;/p&gt;
&lt;h1&gt;TouchGestures.cs&lt;/h1&gt;
&lt;p&gt;The purpose of this component is to facilitate easy handling of common gestures on touch enabled devices. With one instance of the component placed in a scene, you can specify which gestures to track, some key measuring caps with sensible defaults and a list of MonoBehaviours interested in receiving notification when a gesture has been detected.&lt;/p&gt;
&lt;p&gt;An example of how to handle gesture tracking event can be found in this particular snippet from the presentation Control.cs script from Unity Hacks:
&lt;script src='https://gist.github.com/6039082.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This handler responds to single swipes, checking for strictly left or right swipes, handling them by progressing to the next slide/build step or jumping to the previous slide.&lt;/p&gt;
&lt;p&gt;Great, so what do the different configuration values mean? First, let&amp;#8217;s take a look at the tracking clamps:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;maxDuration: If a tracked touch remains active for longer than this time, it is no longer considered as part of a gesture. This avoids misinterpreting drags or virtual joysticks.&lt;/li&gt;
	&lt;li&gt;min[Pinch/Swipe]ScreenTravel: How much of the normalized screen size should a pinch or a swipe travel before it is considered valid? This avoids misinterpreting taps as mini pinches or swipes.&lt;/li&gt;
	&lt;li&gt;maxTapScreenTravel: What is the maximum normalized screen movement a tap gesture can have before it is no longer considered a tap?&lt;/li&gt;
	&lt;li&gt;maxTapDuration: For how long can a tracked touch be live before it is no longer considered a tap?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The last elements are somewhat less finicky and tweak happy, though the tracking clamps should have sensible default values:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;receivers: The list of MonoBehaviours interested in receiving a callback when a gesture has been identified.&lt;/li&gt;
	&lt;li&gt;trackingMask: This is a bitmask identifying which gestures you are interested in tracking. If you only need to deal with swipes, there is no need to spend time tracking any other gestures. Note that in order for this field to be set correctly, it is important that the custom inspector for the TouchGestures component is used.&lt;/li&gt;
	&lt;li&gt;trackMultiple: Should the gesture tracker allow multiple gestures to occur at the same time? Like a pinch and a swipe in different ends of the screen.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And that is about it! You should have what you need to start using the TouchGestures component. Hopefully you will find it useful.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Input/TouchGestures.cs&quot;&gt;TouchGestures.cs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/UnityHacks/blob/master/Assets/Standard%20Assets/Editor/TouchGesturesInspector.cs&quot;&gt;TouchGesturesInspector.cs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2013-07-19 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/07/19/Unity-Hacks-Touch-gestures/</link>
			</item>
			
		
			
			<item>
				<title>OnRenderTextureGUI</title>
				<description>&lt;p&gt;Have you ever wanted to apply a full-screen effect to your &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; without having to completely restructuring the way you set up your OnGUI structure? Or how about rendering text and &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; controls onto in-scene virtual screens and objects? Yea me too.&lt;/p&gt;
&lt;p&gt;So a couple of years ago I did a friday project investigating the possibility of a setup like this. What I wanted was a Doom 3 &amp;#8211; style in-game numpad, responding to mouse clicks. Unfortunately I couldn&amp;#8217;t get there 100% and in a nice and straight-forward way, so I abandoned it with no further time spent.&lt;/p&gt;
&lt;p&gt;The specific problem was that while I could get my &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; to render to the object just fine, the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; system had no way of injecting events or modifying existing ones. This meant that if I wanted &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; to respond to events, I would have to bypass the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; event system and effectively rewrite the basic &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; controls. That failed my &amp;#8220;nice and straight-forward&amp;#8221; requirement.&lt;/p&gt;
&lt;p&gt;However a while later, I came across a similar need: I had a project where the screen was warped slightly fish-eye, to give an impression of an old-school &lt;span class=&quot;caps&quot;&gt;CRT&lt;/span&gt; display. It looked great, except the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; was just rendered on top of everything &amp;#8211; as per usual &amp;#8211; with no warping. Since the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; was non-interactive, there was no down-side to using the approach I had come up with before to include the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; in the full-screen effect rendering.&lt;/p&gt;
&lt;p&gt;It was a snap to apply, I had no required changes to my general OnGUI structure and the result looked great. This setup also came in handy when I was working with the Oculus Rift &amp;#8211; rendering the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; on a plane, rendered always on top, in front of the Oculus cameras.&lt;/p&gt;
&lt;p&gt;So what is the idea then? Well it is quite straight forward: OnGUI is invoked multiple times each frame (once per event) &amp;#8211; at least twice &amp;#8211; unless layouting has been disabled on the MonoBehaviour. The last event of the frame is the repaint event. In this, all resolved controls render to the active context. Which fortunately can be set by render textures.&lt;/p&gt;
&lt;p&gt;The trick therefore becomes:
&lt;script src='https://gist.github.com/5984299.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Remember that this is not immediately useful if you need interactive &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; as this would require work to handle input gathered from the regular UnityEngine.Input &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;. Nonetheless it will give you for instance a scrolling screen of text on an in-game monitor.&lt;/p&gt;
&lt;p&gt;I hope you find it useful!&lt;/p&gt;</description>
				<published>2013-07-17 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/07/17/OnRenderTextureGUI/</link>
			</item>
			
		
			
			<item>
				<title>Unite 13 video "Unity Hacks" available</title>
				<description>&lt;p&gt;The &amp;#8220;Unity Hacks&amp;#8221; presentation, containing a good chunk of practical tips &amp;amp; tricks and example code, I did for Unite 13 Korea, Japan, China and Nordic is now available as video and presentation/examples download. The specific video recording is the one from Unite Japan.&lt;/p&gt;
&lt;p&gt;Find link to video, presentation and examples in the &lt;a href=&quot;/videos&quot;&gt;videos&lt;/a&gt; section.&lt;/p&gt;</description>
				<published>2013-07-05 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/07/05/Unite-13-video-Unity-Hacks-available/</link>
			</item>
			
		
			
			<item>
				<title>The implicit local network interface</title>
				<description>&lt;p&gt;I foolishly promised I would resume my posting of tech stuff on this blog, so I suppose I better own up to that.&lt;/p&gt;
&lt;h1&gt;Story time&lt;/h1&gt;
&lt;p&gt;You are playing some amazingly addictive game on your iOS device when commuting home. Let&amp;#8217;s say it&amp;#8217;s a Mario clone.&lt;/p&gt;
&lt;p&gt;As you arrive home, you want more of this gaming goodness. So you switch on your television and use AirPlay to continue the game on your TV, controls on your iOS device, via your Apple TV or other AirServer hosting, TV connected, device.&lt;/p&gt;
&lt;p&gt;Now your good friend Bob comes by (you forgot to lock the door, so he walks straight in). Obviously this game is too good to put down, so in stead you instruct Bob to buy a copy of it. Bob pulls out his android phone, jumps on your wifi, downloads the game and starts playing.&lt;/p&gt;
&lt;p&gt;At one point in Bobs game he sees this funky spinning portal in the level and opts to tap it. And poof! Bobs character is sucked into your game on the TV.&lt;/p&gt;
&lt;p&gt;Unfortunately Bob is a terrible player of this game and ruins your score, but it was pretty cool to try this game in multiplayer mode.&lt;/p&gt;
&lt;h1&gt;Do want!&lt;/h1&gt;
&lt;p&gt;The above scenario may sound complex to set up, but like so many other cases, it is just a nice combination of simpler bits. So let&amp;#8217;s look into how we enable something like this in our (Unity based) game.&lt;/p&gt;
&lt;p&gt;First up, AirPlay support was recently added to Unity and I posted &lt;a href=&quot;https://gist.github.com/AngryAnt/5160204&quot;&gt;a gist&lt;/a&gt; to help people get started with it.&lt;/p&gt;
&lt;p&gt;Secondly, we need to host a network game pretty much all the time, so that others may join any ongoing session at any time. Of-course you might want to provide an opt-in/out setting for networked play in your game. Just remember that we are only enabling this feature for local network play &amp;#8211; not internet play like Journey did it.&lt;/p&gt;
&lt;p&gt;For information on how to easily set up this network game, see the talk I did at Unite 12 in Amsterdam: &amp;#8220;Unity, Network Code, and You&amp;#8221; &amp;#8211; the example provided for the built-in networking is quite relevant to the above example. You can find the talk linked from the &lt;a href=&quot;/videos/&quot;&gt;video&lt;/a&gt; section of this site.&lt;/p&gt;
&lt;p&gt;So with those parts in place, we just need a bit of glue &amp;#8211; namely the broadcasting of games on your local network. This gist deals with just that:
&lt;script src='https://gist.github.com/5730611.js?file=Broadcaster.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;if (m_BroadcastTimer == null)
// Setup broadcast of hosting service
{
	m_BroadcastSocket = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);&lt;/p&gt;
&lt;p&gt;try
	{
		IPAddress broadcastGroup = IPAddress.Parse (kBroadcastGroup);&lt;/p&gt;
&lt;p&gt;m_BroadcastSocket.SetSocketOption (
			SocketOptionLevel.IP,
			SocketOptionName.AddMembership,
			new MulticastOption (broadcastGroup)
		);&lt;/p&gt;
&lt;p&gt;m_BroadcastSocket.SetSocketOption (
			SocketOptionLevel.IP,
			SocketOptionName.MulticastTimeToLive,
			1
		);&lt;/p&gt;
&lt;p&gt;m_BroadcastSocket.Connect (new IPEndPoint (broadcastGroup, kBroadcastPort));
	}
	catch (Exception e)
	{
		Debug.LogError (string.Format (
			&amp;quot;Exception when attempting to set up service broadcast ({0}:{1}): {2}&amp;quot;,
			kBroadcastGroup,
			kBroadcastPort,
			e
		));&lt;/p&gt;
&lt;p&gt;return false;
	}&lt;/p&gt;
&lt;p&gt;m_BroadcastTimer = new Timer (kBroadcastDelay);&lt;/p&gt;
&lt;p&gt;m_BroadcastTimer.Elapsed += new ElapsedEventHandler (
		(object s, ElapsedEventArgs e) =&amp;gt;
		{
			m_BroadcastSocket.Send (GetBroadcastBytes ());
		}
	);
	m_BroadcastTimer.Enabled = true;
}&lt;/p&gt;
&lt;p&gt;return true;&lt;/p&gt;
&lt;p&gt;// &amp;#8230;&lt;/p&gt;
&lt;p&gt;byte[] GetBroadcastBytes ()
{
	/*
		Return byte array containing IP and port of our host socket plus meta data
		such as current level and perhaps location (for portal placement)
	*/
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s go over the interface for this gist:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;kBroadcastGroup&lt;/strong&gt; and &lt;strong&gt;kBroadcastPort&lt;/strong&gt; are effectively shared keys we use to facilitate broadcasting communication between game instances. Broadcasting happens by way of multi-casting &amp;#8211; an IP protocol feature allowing peers to send one package to multiple unidentified receivers. This is why our shared keys are in the form of an IP address and a port, though their value is completely arbitrary &amp;#8211; all that matters is that both broadcaster and receiver use the same keys.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;m_BroadcastTimer&lt;/strong&gt; and &lt;strong&gt;kBroadcastDelay&lt;/strong&gt; control how often &lt;strong&gt;m_BroadcastSocket&lt;/strong&gt; will send out the broadcast message generated by &lt;strong&gt;GetBroadcastBytes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This covers the transmission part of the broadcast functionality. The following gist deals with receiving the broadcast message:&lt;/p&gt;
&lt;script src='https://gist.github.com/5730611.js?file=Seeker.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;if (m_SeekerSocket == null)
{
	m_SeekerSocket = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

	try
	{
		m_SeekerSocket.Bind (new IPEndPoint (IPAddress.Any, kBroadcastPort));

		IPAddress broadcastGroup = IPAddress.Parse (kBroadcastGroup);

		m_SeekerSocket.SetSocketOption (
			SocketOptionLevel.IP,
			SocketOptionName.AddMembership,
			new MulticastOption (broadcastGroup, IPAddress.Any)
		);

		ReadBroadcasts ();
	}
	catch (Exception e)
	{
		Debug.LogError (string.Format (
			&amp;amp;quot;Exception when attempting to set up service listener ({0}:{1}): {2}&amp;amp;quot;,
			kBroadcastGroup,
			kBroadcastPort,
			e
		));

		m_SeekerSocket.Dispose ();
	}
}

// ...

void ReadBroadcasts ()
{
	/*
		Now set up periodic or event-driven reading from m_SeekerSocket, parsing
		broadcast packages containing IP, port and meta data of locally available games
	*/
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Like with the broadcaster, &lt;strong&gt;kBroadcastGroup&lt;/strong&gt; and &lt;strong&gt;kBroadcastPort&lt;/strong&gt; are used with the same values to make sure we are listening on the same multi-cast setup as the broadcaster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;m_SeekerSocket&lt;/strong&gt; is the socket on which broadcasts will be received &amp;#8211; just like you would on any other reception socket.&lt;/p&gt;
&lt;p&gt;And that is all there is to it. I hope you found it useful.&lt;/p&gt;</description>
				<published>2013-06-07 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/06/07/The-implicit-local-network-interface/</link>
			</item>
			
		
			
			<item>
				<title>Talks and progress</title>
				<description>&lt;p&gt;Recently I have been posting less hacks, tips and tricks than I wanted to and I fully intend to rectify this. However, first let me provide a brief overview of what I have in stead been squandering my time on.&lt;/p&gt;
&lt;p&gt;2013 started off with lots of still-internal Unity work which I hope will be publicly available very soon. Shortly after that I was off to a very busy &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; with a very fancy booth sandwiched between Sony and Nintendo (very fitting given our announcements of partnering with both to support their new platforms).&lt;/p&gt;
&lt;p&gt;Beforehand, I had been playing around with the Oculus Rift devkits we had received in the Unity Copenhagen office and at &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; a guy from Road To VR caught me for an interview about this. If you are interested in Unity and Oculus Rift, you can find the interview linked from the &lt;a href=&quot;/videos/&quot;&gt;video section&lt;/a&gt; of this site.&lt;/p&gt;
&lt;p&gt;Following &lt;span class=&quot;caps&quot;&gt;GDC&lt;/span&gt; I had a week at home to reset my time-zone orientation again, before heading to this years Unite Asia tour (re-branded from last years Unity Asia Bootcamp). So that week obviously went completely into talk prep.&lt;/p&gt;
&lt;p&gt;Unfortunately the talk recordings are not yet available, but as soon as they are, I will make sure to link them from the &lt;a href=&quot;/videos/&quot;&gt;video section&lt;/a&gt;, where you can also find recordings and example source from last years Unity Asia Bootcamp.&lt;/p&gt;
&lt;p&gt;After the two weeks blast through Asia, I had taken three weeks of vacation to reset an at this point quite messed up time-zone orientation. While I did spend some time relaxing, however I of-course had a hard time not using such a great opportunity to make some headway on Behave 2.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/resources/share/behave2peek.png&quot; title=&quot;Sneak peek at Behave 2&quot; alt=&quot;Sneak peek at Behave 2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Remaining tasks are mainly polish items and one fix for iOS &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; compilation &amp;#8211; specifically I have moved serialization to use ProtoBuf-net for better performance and flexibility, however this library requires slightly different implementation for &lt;span class=&quot;caps&quot;&gt;AOT&lt;/span&gt; compatibility than regular &lt;span class=&quot;caps&quot;&gt;JIT&lt;/span&gt; platforms.&lt;/p&gt;
&lt;p&gt;I hope to get this wrapped up and shipped very soon, however right now I am sitting on the train to Malmö &amp;#8211; headed to the Unite Nordic conference. Tomorrow at the conference (May 22nd) I am scheduled to give two talks &amp;#8211; &amp;#8220;Unity Hacks&amp;#8221; at 10:00 and &amp;#8220;Cross-platform Considerations&amp;#8221; at 14:30.&lt;/p&gt;
&lt;p&gt;&amp;#8220;Unity Hacks&amp;#8221; is a repeat from Unite Asia, so if you don&amp;#8217;t want to wait for the videos on that one, tomorrow is your chance for some great Unity hackery. For the complete conference schedule, see the &lt;a href=&quot;http://unity3d.com/unite/nordic/&quot;&gt;Unite Nordic website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, after much consideration I decided to end my time at Unity Technologies. It has been great fun, but now seems the right time to get out and stretch my legs a bit. I do so by starting contracting again and if you&amp;#8217;re interested in working together, please use &lt;a href=&quot;/contracting&quot;&gt;the form&lt;/a&gt; I have provided for that purpose.&lt;/p&gt;
&lt;p&gt;Or if you are at Unite Nordic or Nordic Game which follows right after, feel free to give me a poke there.&lt;/p&gt;
&lt;p&gt;Until next time!&lt;/p&gt;</description>
				<published>2013-05-21 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/05/21/Talks-and-progress/</link>
			</item>
			
		
			
			<item>
				<title>Five years of Unity expertise looking for contracts</title>
				<description>&lt;p&gt;On the 28th of June, after four great years at Unity Technologies, I part ways with my friends to go explore for a while &amp;#8211; doing consulting / contract work.&lt;/p&gt;
&lt;p&gt;I have had a great time and seen absolutely crazy growth and things while at Unity. I definitely am leaving with a nice big bag of great memories. However I feel the need to stretch my legs a bit, so off I go.&lt;/p&gt;
&lt;p&gt;So I am available for contracts from July 1st, offering up among other things, my five years of Unity expertise. For more details on the things that I do there is this site and my &lt;a href=&quot;http://eej.dk&quot;&gt;LinkedIn profile&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And, well, that&amp;#8217;s pretty much it. Want to play? Please use the handy contact form I set up: &lt;a href=&quot;/contracting&quot;&gt;Handy contact form&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2013-05-14 00:00:00 +0200</published>
				<link>http://www.angryant.com/2013/05/14/Five-years-of-Unity-expertise-looking-for-contracts/</link>
			</item>
			
		
			
			<item>
				<title>Automagic Unity Android Java gadget OF DOOM!</title>
				<description>&lt;p&gt;Ok maybe not that dramatic, but pretty handy if you&amp;#8217;re working with Unity Android and doing some Java plugin work.&lt;/p&gt;
&lt;p&gt;I hadn&amp;#8217;t really touched Unity Android specific code since setting up automatic testing of it, so a few months back I wanted to remedy that by diving in head-first with an obvious not-hello-world sort of project.&lt;/p&gt;
&lt;p&gt;For christmas of 2011, my awesome parents had bought me a &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; board&lt;sup class=&quot;footnote&quot; id=&quot;fnr1&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;. I wanted to push some more boundaries of mine and do some hacking which couldn&amp;#8217;t all be contained in an email attachment and the &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; seemed a great start for that.&lt;/p&gt;
&lt;p&gt;In short, the &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; board is a small, inexpensive IO board with a &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; interface and Android drivers &amp;#8211; allowing you to connect your Android phone to it and control its 48 IO ports from software running on that phone.&lt;/p&gt;
&lt;p&gt;Obviously I had to write that software as a Unity project and I hope I&amp;#8217;ll get some more time to polish up the last bits of the soft- and hardware for it soonish and tell you some more about it.&lt;/p&gt;
&lt;p&gt;Anywho, that&amp;#8217;s enough background. Long story short, I obviously started out (after consulting the Unity documentation on how to work with the Java interface with Unity Android which I would need to access the &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; driver) by doing some editor scripting to reduce my iteration time on the Java I needed. Wisely I predicted that my Java would be so terribly rusty that I would need a significant number of iterations.&lt;/p&gt;
&lt;p&gt;Basically what I wanted was to get rid of the multiple steps needed for compiling, signing and assembling a Java plugin. Initially I just hacked together a perl script to reduce those steps to one line of shell execution, but that still meant more context switching than I wanted.&lt;/p&gt;
&lt;p&gt;So I leveled up the hack by having a Unity asset post processor automatically execute the perl script whenever a Java file got imported in the plugins directory &amp;#8211; re-routing any output from it to the Unity console.&lt;/p&gt;
&lt;p&gt;That was really awesome. I would make a change in my Java, save it, switch to Unity and see all my horrible compiler errors right there in the console. And as this was my only Android project, I was quite happy with my hack &amp;#8211; proceeding to kill my compiler errors and build my &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; project.&lt;/p&gt;
&lt;p&gt;Some friends had been poking me about cleaning up and generalising the hack a bit more and luck would have it that in my christmas vacation I spent a lot of time being sick. So I used some time here and there to clean up the Unity Android plugin builder and yesterday I pushed it to github &amp;#8211; without any project specific bits, without perl and somewhat more user friendly.&lt;/p&gt;
&lt;p&gt;Check it out and let me know what you think. If anything is broken or you&amp;#8217;d like to request a change or addition, please use the github issues feature:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/AngryAnt/JavaPluginBuilder&quot;&gt;The JavaPluginBuilder repository on github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn1&quot;&gt;&lt;a href=&quot;#fnr1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; &lt;a href=&quot;https://www.sparkfun.com/products/10748&quot;&gt;The &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; board&lt;/a&gt;&lt;/p&gt;</description>
				<published>2012-12-22 00:00:00 +0100</published>
				<link>http://www.angryant.com/2012/12/22/Automagic-Unity-Android-Java-gadget-OF-DOOM/</link>
			</item>
			
		
			
			<item>
				<title>Invading Planet from your couch</title>
				<description>&lt;p&gt;So yesterday was Tuesday which would normally mean I head to the local hackerspace and play around with my RC car and &lt;span class=&quot;caps&quot;&gt;IOIO&lt;/span&gt; board. However that plan was completely shot down by girlfriend homework leading to required baby juggling. Which is always fun.&lt;/p&gt;
&lt;p&gt;Obviously I did not let that deter me from getting some hacking done anyway, so I picked up another project I&amp;#8217;d had on my &lt;span class=&quot;caps&quot;&gt;TODO&lt;/span&gt; for a while.&lt;/p&gt;
&lt;p&gt;You see I quite like my home entertainment setup. So much that aside from music, reading and the occasional iOS game, I only consume entertainment from my couch.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/resources/posts/2012-10-03-Invading-Planet-from-your-couch/CouchEntertainment.jpg&quot; title=&quot;The view from my couch&quot; alt=&quot;The view from my couch&quot; /&gt;&lt;/p&gt;
&lt;p class=&quot;comment&quot;&gt;Photo shows Star Craft II running in order to appease the SC2 gang at work which is not at all impressed with the amount of hours I manage to spend training with them. I tend to play more Alpha Centauri and Galactic Civilizations II ;)&lt;/p&gt;
&lt;p&gt;That includes the occasional gaming on my mini which I mostly use for TV and videos through Plex&lt;sup class=&quot;footnote&quot; id=&quot;fnr1&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;, so launching a game means hiding or quitting Plex, finding the game in whatever launcher, running it and then reversing when done.&lt;/p&gt;
&lt;p&gt;Now, I&amp;#8217;m lazy and I miss a feature of Plex 8 which allowed you to launch apps from within Plex &amp;#8211; right from your apple remote. So my hacking session last evening was creating a small Plex plugin which brings that feature back &amp;#8211; as I have been unable to find a pre-existing solution from someone else.&lt;/p&gt;
&lt;p&gt;And it works just lovely. I now only need to select AppTV from my Plex main menu, select Alpha Centauri, get out my bluetooth mouse and keyboard and get gaming.&lt;/p&gt;
&lt;p&gt;And you can too! Go find the &lt;a href=&quot;https://github.com/AngryAnt/AppTV&quot;&gt;AppTV project on github&lt;/a&gt; and have some fun :)&lt;/p&gt;
&lt;p&gt;Oh and if you add something cool, pull requests would be awesome.&lt;/p&gt;
&lt;p class=&quot;footnote&quot; id=&quot;fn1&quot;&gt;&lt;a href=&quot;#fnr1&quot;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; &lt;a href=&quot;http://plexapp.com&quot;&gt;Plex&lt;/a&gt;&lt;/p&gt;</description>
				<published>2012-10-03 00:00:00 +0200</published>
				<link>http://www.angryant.com/2012/10/03/Invading-Planet-from-your-couch/</link>
			</item>
			
		
			
			<item>
				<title>Mountain Lion and laggy bluetooth and duct-tape</title>
				<description>&lt;p&gt;If you, like me, run a bluetooth keyboard and mouse on your Mountain Lion machine, you might have noticed recent occasional slow-downs in the response time from those devices.&lt;/p&gt;
&lt;p&gt;A bit of googling told me that was not an uncommon problem and that apparently it happens mostly after resuming the OS after sleep. Also the solution appears to be restarting the BT radio.&lt;/p&gt;
&lt;p&gt;So until apple addresses this, I&amp;#8217;ve written myself a little utility apple script for turning the radio off and back on again. It&amp;#8217;s based on &lt;a href=&quot;http://www.frederikseiffert.de/blueutil/&quot;&gt;blueutil&lt;/a&gt; which is available with source if you worry about malware and simply turns off the radio for five seconds before turning it back on.&lt;/p&gt;
&lt;p&gt;I hope you find it useful.&lt;/p&gt;
&lt;script src='https://gist.github.com/3798723.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;do shell script &amp;amp;quot;sudo /usr/local/bin/blueutil off&amp;amp;quot; with administrator privileges
delay 5
do shell script &amp;amp;quot;sudo /usr/local/bin/blueutil on&amp;amp;quot; with administrator privileges&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;</description>
				<published>2012-09-28 00:00:00 +0200</published>
				<link>http://www.angryant.com/2012/09/28/Mountain-Lion-and-laggy-bluetooth-and-duct-tape/</link>
			</item>
			
		
			
			<item>
				<title>Unite 12 video and new videos section available</title>
				<description>&lt;p&gt;While I was away at gameAIconf 12 in Vienna, the recording of my networking talk at this years Unite conference was made available.&lt;/p&gt;
&lt;p&gt;Rather than spreading more sporatic linking in various blog posts, I created a videos page collecting up talks, interviews and documentation videos. I&amp;#8217;m hoping it will serve as a good addition to the blog and my gists.&lt;/p&gt;
&lt;p&gt;The new section can be found over at &lt;a href=&quot;/videos&quot;&gt;/videos&lt;/a&gt;&lt;/p&gt;</description>
				<published>2012-09-23 00:00:00 +0200</published>
				<link>http://www.angryant.com/2012/09/23/Unite-12-video-and-new-videos-section-available/</link>
			</item>
			
		
			
			<item>
				<title>Asia Bootcamp videos now available</title>
				<description>&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;OHAI&lt;/span&gt;!&lt;/p&gt;
&lt;p&gt;Good news everyone! Having just gotten back from Unite 12, I&amp;#8217;ve just been informed that the videos from the Asia Bootcamp earlier this year are now available for public consumption!&lt;/p&gt;
&lt;p&gt;Here are the two talks I did on the tour (recordings from the Tokyo event):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://vimeopro.com/unity3djp/unity-asia-bootcamp-tour-tokyo-for-the-public/video/41968409&quot;&gt;Streamlining your Unity editor&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://vimeopro.com/unity3djp/unity-asia-bootcamp-tour-tokyo-for-the-public/video/41969880&quot;&gt;Rapid network- and AI-ready game development in Unity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that example projects and slides are linked just below the videos.&lt;/p&gt;
&lt;p&gt;At this yeas Unite I gave the talk &amp;#8220;Unity, Network Code, and You&amp;#8221;, which was also recorded. I&amp;#8217;ll make the recordings and example projects available for that as soon as everything is cut and online.&lt;/p&gt;</description>
				<published>2012-08-28 00:00:00 +0200</published>
				<link>http://www.angryant.com/2012/08/28/Asia-Bootcamp-videos-now-available/</link>
			</item>
			
		
			
			<item>
				<title>Path is now MIT licensed</title>
				<description>&lt;p&gt;Hey guys. Obviously I&amp;#8217;ve been pretty busy and since I&amp;#8217;d like to spend the spare time coding time I have on Behave, I have just made the Path repository publicly available with an &lt;span class=&quot;caps&quot;&gt;MIT&lt;/span&gt; license attached.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/AngryAnt/Path&quot; title=&quot;Path on github&quot;&gt;https://github.com/AngryAnt/Path&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that I will be monitoring and taking in pull requests as well as compiling builds for releasing into the asset store (obviously as a free package). Let&amp;#8217;s make this project as awesome as can be :)&lt;/p&gt;
&lt;p&gt;Issue tracking and wiki development (I would appreciate collaborators on that as well) is still happening on &lt;a href=&quot;https://github.com/AngryAnt/Path-release&quot; title=&quot;The Path-release repository on github&quot;&gt;https://github.com/AngryAnt/Path-release&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Happy hacking!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forum.unity3d.com/threads/78037-AI-Pathfinding-in-Unity-Path&quot; title=&quot;Path thread on the Unity forum&quot;&gt;Unity forum thread&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2012-05-17 00:00:00 +0200</published>
				<link>http://www.angryant.com/2012/05/17/path-is-now-mit-licensed/</link>
			</item>
			
		
			
			<item>
				<title>Behave 1.4 released</title>
				<description>&lt;p&gt;So obviously I ended up not spending more time on that &lt;span class=&quot;caps&quot;&gt;RPG&lt;/span&gt; thing&amp;#8230; I did however work on some 3.5 stuff back at Unity, some upcoming demo stuff and baby Lili was born.&lt;/p&gt;
&lt;p&gt;Meanwhile I spent spare time on Behave rather than the &lt;span class=&quot;caps&quot;&gt;RPG&lt;/span&gt; thing, so now 1.4 is ready for release. &lt;span class=&quot;caps&quot;&gt;TADAA&lt;/span&gt;!&lt;/p&gt;
&lt;p&gt;This release primarily holds runtime optimizations, fixes and tweaks. Specifically I would like to highlight the ability to mark components as &amp;#8220;instant&amp;#8221;. The instant flag affects sequences and selectors when moving between child nodes. When an instant child component completes, rather than waiting for the next tick to tick the following child node, the sequence or selector does it immediately.&lt;/p&gt;
&lt;p&gt;Anywho, get it on the asset store and remember to rebuild your libraries after installing.&lt;/p&gt;
&lt;p&gt;The rest of the changes follow:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fixed decorator incorrectly initializing on every returning tick when tick handler returned Running.&lt;/li&gt;
	&lt;li&gt;Fixed debugger view dependency on active tree editor &amp;#8211; causing reported null reference exception.&lt;/li&gt;
	&lt;li&gt;Fixed missing scrollbars on browser window.&lt;/li&gt;
	&lt;li&gt;Reduced logging noise from debug builds.&lt;/li&gt;
	&lt;li&gt;Agent blueprints can now be MonoBehaviour based.&lt;/li&gt;
	&lt;li&gt;Clarified wording on &amp;#8220;library not loaded&amp;#8221;.&lt;/li&gt;
	&lt;li&gt;Now handling reset a bit cleverer &amp;#8211; potential performance boost.&lt;/li&gt;
	&lt;li&gt;Changed the default success criteria of Parallel components from SuccessOrFailure to Success.&lt;/li&gt;
	&lt;li&gt;Added &amp;#8220;instant&amp;#8221; flag to components. Components marked instant will affect sequences and selectors when moving between child nodes. When a child node marked &amp;#8220;instant&amp;#8221; completes, rather than waiting for the next tree tick to tick the following child node, the sequence or selector does it immediately.&lt;/li&gt;
	&lt;li&gt;The compiler progress bar returns.&lt;/li&gt;
	&lt;li&gt;Editing a Behave asset now focuses the asset browser last instead of the tree editor.&lt;/li&gt;
	&lt;li&gt;Behave can now be installed in any subfolder of Assets &amp;#8211; provided its internal folder structure remains intact.&lt;/li&gt;
	&lt;li&gt;Compilation speed improvements.&lt;/li&gt;
	&lt;li&gt;Enabled references across collection borders.&lt;/li&gt;
	&lt;li&gt;Added Tree.DataSize &amp;#8211; returning the number of bytes used by a tree instance. This is also displayed in the debugger window.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;#8217;ll find a link to the package in the &lt;a href=&quot;/behave/download&quot; title=&quot;The Behave download section&quot;&gt;download&lt;/a&gt; section. Have fun!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released&quot; title=&quot;Behave thread on the Unity forum&quot;&gt;Unity forum thread&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2011-11-30 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/11/30/behave-1-4-released/</link>
			</item>
			
		
			
			<item>
				<title>So I've been a bit busy lately</title>
				<description>&lt;p&gt;Little under half a year later and I&amp;#8217;m still here. Things have been rather hectic since my last update. In Copenhagen we conquered more office space and my team moved in there. I made some demos (&lt;a href=&quot;http://u3d.as/content/unity-technologies/third-person-mmo-controller/1Wt&quot;&gt;Third Person &lt;span class=&quot;caps&quot;&gt;MMO&lt;/span&gt; Controller&lt;/a&gt; and &lt;a href=&quot;http://u3d.as/content/unity-technologies/astro-dude/24Y&quot;&gt;Astro Dude&lt;/a&gt;), went to &lt;a href=&quot;http://gameaiconf.com/&quot;&gt;a conference&lt;/a&gt;, worked on &lt;a href=&quot;http://blogs.unity3d.com/2011/06/16/unity-roadmap-2011/&quot;&gt;a Unity release&lt;/a&gt; and pitched in to realize &lt;a href=&quot;http://unity3d.com/unite/&quot;&gt;another killer conference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By the way at that last conference I did a talk titled &amp;#8220;AI in Unity&amp;#8221; &amp;#8211; the goal of which was to try and demystify the concept of AI a bit. I&amp;#8217;ll make some noise when we have the recording of it available.&lt;/p&gt;
&lt;p&gt;Oh and I fixed the comments on the blog, so I&amp;#8217;ve just cleared out 300-something spam posts. Anyone got advice on how to avoid this on a WordPress blog? (Read: I&amp;#8217;m too lazy to change blogging system if anyone suggests that). Oh and therefore I enabled the &amp;#8220;must approve comments&amp;#8221; thingy. Not sure if that is going to help anything, but at least it will reduce the noise on your end.&lt;/p&gt;
&lt;p&gt;So what is next then? Well I&amp;#8217;ve got a few things I&amp;#8217;d like to release in a Behave point upgrade and then the plan is to move on to 2.0 which will hold some backwards-compatibility breaking changes.&lt;/p&gt;
&lt;p&gt;At Unity there&amp;#8217;s a bit more 3.5 stuff to do and some even awesomererer demos on the way. The extra awesomeness has been underway for quite a while, so I&amp;#8217;m very excited to get this out soon.&lt;/p&gt;
&lt;p&gt;I very recently started playing around with some &lt;span class=&quot;caps&quot;&gt;RPG&lt;/span&gt; mechanics in my spare time (had a day off after Unite and couldn&amp;#8217;t sit still). It&amp;#8217;s so spare time that the plan is to have no additional plans. Let&amp;#8217;s see where that goes.&lt;/p&gt;
&lt;p&gt;Ah and I&amp;#8217;ll work with &lt;a href=&quot;http://www.blender.org/blenderorg/blender-foundation/&quot;&gt;some groovy dudes&lt;/a&gt; on getting a &lt;a href=&quot;http://copenhagen.startupweekend.org/&quot;&gt;3D themed workshop event&lt;/a&gt; up and going early next year. I don&amp;#8217;t think it has been announced yet, but it will be awesome &amp;#8211; and full of Unity of-course. That should hit right before &lt;a href=&quot;http://nordicgamejam.org/&quot;&gt;the other groovy thing&lt;/a&gt; I&amp;#8217;m working on again this year with more &lt;a href=&quot;http://igda.dk/&quot;&gt;awesome dudes and dudettes&lt;/a&gt;. Fun times!&lt;/p&gt;
&lt;p&gt;What else? Oh yea. With my low bandwidth for updates, I&amp;#8217;ve increasingly turned to &lt;a href=&quot;http://twitter.com/#!/angryant&quot;&gt;twitter&lt;/a&gt; and the &lt;a href=&quot;https://gist.github.com/AngryAnt&quot;&gt;gist&lt;/a&gt; feature of &lt;a href=&quot;https://github.com/AngryAnt&quot;&gt;github&lt;/a&gt;. Hopefully I will have the time to do some good reads in the Tips and Tricks section soon, but the gist setup is just so very quick.&lt;/p&gt;
&lt;p&gt;I probably forgot a ton of stuff, but hopefully this was a good reboot of this blog thing. Let&amp;#8217;s see what happens. Maybe I could start blogging about that &lt;span class=&quot;caps&quot;&gt;RPG&lt;/span&gt; thing if it accidentally turns interesting. We&amp;#8217;ll see.&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;</description>
				<published>2011-10-09 00:00:00 +0200</published>
				<link>http://www.angryant.com/2011/10/09/so-ive-been-a-bit-busy-lately/</link>
			</item>
			
		
			
			<item>
				<title>Behave 1.3 released</title>
				<description>&lt;p&gt;After quite a long break (including shifting around at utech, doing a Path release etc.), Behave is finally getting another update!&lt;/p&gt;
&lt;p&gt;This release is primarily a bugfix and editor polish release. One thing I&amp;#8217;d like to highlight though is the addition of agent blueprints. From the changelog:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;- Added agent blueprints &amp;#8211; connecting to agent handlers through virtual methods rather than reflected handlers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Generally this enables you to more explicitly tie up handlers and cuts down on tree initialization time. Oh and of-course you gain auto-completion when setting up your handlers.&lt;/p&gt;
&lt;p&gt;Anyway, here&amp;#8217;s the whole changelog:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fixed priority selector init flag resetting.&lt;/li&gt;
	&lt;li&gt;Fixed reference handling on tree renaming and deletion.&lt;/li&gt;
	&lt;li&gt;Fixed references still pointing at old collection post collection duplication.&lt;/li&gt;
	&lt;li&gt;Fixed compilation of actions and decorators with non-integral float parameters.&lt;/li&gt;
	&lt;li&gt;Fixed &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; list behaviours.&lt;/li&gt;
	&lt;li&gt;Fixed passing context back and forth between referenced trees and referrer.&lt;/li&gt;
	&lt;li&gt;Fixed reordering connections not causing save state to be set.&lt;/li&gt;
	&lt;li&gt;Various &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; tweaks.&lt;/li&gt;
	&lt;li&gt;Runtime optimisations.&lt;/li&gt;
	&lt;li&gt;Enabled scrolling of the tree list in the debugger window.&lt;/li&gt;
	&lt;li&gt;Exposed Tree.ReflectForwards.&lt;/li&gt;
	&lt;li&gt;Added Tree.ResetForwards.&lt;/li&gt;
	&lt;li&gt;Added agent blueprints &amp;#8211; connecting to agent handlers through virtual methods rather than reflected handlers.&lt;/li&gt;
	&lt;li&gt;Made connections selectable in the tree editor via the connection nub.&lt;/li&gt;
	&lt;li&gt;Moved connection managing from the inspector to the tree editor, where it is more visible and handy.&lt;/li&gt;
	&lt;li&gt;Added support for disabling connections &amp;#8211; for faster, less destructive debugging.&lt;/li&gt;
	&lt;li&gt;Double-click reference component to jump to referenced tree.&lt;/li&gt;
	&lt;li&gt;Changed &amp;#8220;Cannot update unregistered tree&amp;#8221; handling from an exception to an error message. Still need more info.&lt;/li&gt;
	&lt;li&gt;Now showing string and float parameters in the tree editor if either is set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;#8217;ll find a link to the package in the &lt;a href=&quot;/behave/download&quot; title=&quot;The Behave download section&quot;&gt;download&lt;/a&gt; section. Have fun!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released&quot; title=&quot;Behave thread on the Unity forum&quot;&gt;Unity forum thread&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2011-04-28 00:00:00 +0200</published>
				<link>http://www.angryant.com/2011/04/28/behave-1-3-released/</link>
			</item>
			
		
			
			<item>
				<title>IGDA Unity SIG slides</title>
				<description>&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;OHAI&lt;/span&gt;! Sorry about the delay &amp;#8211; things have been a bit hectic around here. Per request, I&amp;#8217;m making available exports of three of my slideshows from the recent &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; Unity SIGs. I hope you&amp;#8217;ll find them useful:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;/resources/posts/2011-04-23-igda-unity-sig-slides/AI%20in%20Unity.pdf&quot;&gt;AI in Unity&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/resources/posts/2011-04-23-igda-unity-sig-slides/Network.pdf&quot;&gt;Network&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/resources/posts/2011-04-23-igda-unity-sig-slides/Unity%20GUI.pdf&quot;&gt;Unity &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2011-04-23 00:00:00 +0200</published>
				<link>http://www.angryant.com/2011/04/23/igda-unity-sig-slides/</link>
			</item>
			
		
			
			<item>
				<title>Second Unity IGDA SIG this evening: Scene construction and AI</title>
				<description>&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;OHAI&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A week has passed and the second of six Unity specific &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; SIGs is upon us. Like last time, the event will take place at the IT University, Copenhagen, Denmark at 1800.&lt;/p&gt;
&lt;p&gt;We will meet in the reception and from there move to the auditorium. The originally planned physics bit of todays &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt; has been rescheduled to next thursday, where Jonas Echterhoff will be in town and give the talk. Jonas is the man with the plan of the PhysX integration in Unity, so added awesomenessness!&lt;/p&gt;
&lt;p&gt;This means that today Joe Robins will be talking about scene construction and I will be covering AI in Unity.&lt;/p&gt;
&lt;p&gt;For this thursday we should be lucky and get even more Unity Tech people to participate in the discussion bit of the &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt;. And remember afterwards we&amp;#8217;re doing the bar meet and given it&amp;#8217;s Saint Patricks, we&amp;#8217;re likely to be a good group of people moving from bar to bar.&lt;/p&gt;
&lt;p&gt;The original &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; post w. schedule:
&lt;a href=&quot;http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/&quot;&gt;http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; post on the rescheduling of the physics talk:
&lt;a href=&quot;http://igda.dk/2011/03/16/unity-sig-update-on-the-meeting-thursday-173/&quot;&gt;http://igda.dk/2011/03/16/unity-sig-update-on-the-meeting-thursday-173/&lt;/a&gt;&lt;/p&gt;</description>
				<published>2011-03-17 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/03/17/second-unity-igda-sig-this-evening-scene-construction-and-ai/</link>
			</item>
			
		
			
			<item>
				<title>First IGDA Unity SIG this evening</title>
				<description>&lt;p&gt;Quick announcement for anyone in or around the &lt;span class=&quot;caps&quot;&gt;CPH&lt;/span&gt; area: I&amp;#8217;m doing the first of six &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; Unity SIGs (Special Interest Groups) this evening, with Joe Robins.&lt;/p&gt;
&lt;p&gt;The event is held at the IT University of Copenhagen and starts at 1800. Anyone can attend (for free) and this first &lt;span class=&quot;caps&quot;&gt;SIG&lt;/span&gt; will be a general introduction to Unity &amp;#8211; basic principles of the engine, workflow and such. The following five SIGs will dive into various specific areas of Unity.&lt;/p&gt;
&lt;p&gt;For more information and the full program, see the &lt;span class=&quot;caps&quot;&gt;IGDA&lt;/span&gt; DK blog:
&lt;a href=&quot;http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/&quot;&gt;http://igda.dk/2011/02/01/unity-sig-unity-special-interest-group-launch/&lt;/a&gt;&lt;/p&gt;</description>
				<published>2011-03-10 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/03/10/first-igda-unity-sig-this-evening/</link>
			</item>
			
		
			
			<item>
				<title>Alternative licensing available</title>
				<description>&lt;p&gt;After having been poked on the issue for a while now, I&amp;#8217;m finally offering the option of requesting alternative licensing on Path and Behave.&lt;/p&gt;
&lt;p&gt;Something in the default license which doesn&amp;#8217;t fit your project too well? Let&amp;#8217;s talk about it. Please use the form available on the &lt;a href=&quot;/behave/download/&quot;&gt;download&lt;/a&gt; page.&lt;/p&gt;</description>
				<published>2011-03-03 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/03/03/alternative-licensing-available/</link>
			</item>
			
		
			
			<item>
				<title>Pathfinding in two lines</title>
				<description>&lt;p&gt;I just updated the &lt;a href=&quot;/path/documentation&quot;&gt;Path documentation&lt;/a&gt; with a short tutorial describing the simplest possible interface between your code and the Path runtime: &amp;#8220;Pathfinding in two lines&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Furthermore, I added a link to the previously released introduction video to Path 2.0b1. While I will make sure to re-record it with the released build, 99% of the stuff in that video still applies.&lt;/p&gt;</description>
				<published>2011-02-15 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/02/15/pathfinding-in-two-line/</link>
			</item>
			
		
			
			<item>
				<title>Path 2 released</title>
				<description>&lt;p&gt;That&amp;#8217;s right, Path is back in business &amp;#8211; easier to use and more powerful than ever before! Version 2 is now available for download on the Unity asset store. Find a link to it in the &lt;a href=&quot;/path/download&quot;&gt;download&lt;/a&gt; section &amp;#8211; along with an example seeker script.&lt;/p&gt;
&lt;p&gt;Full &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; documentation is available in the &lt;a href=&quot;/path/documentation&quot;&gt;documentation&lt;/a&gt; section &amp;#8211; more documentation is on the way, as is integration between UnitySteer and Path 2.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s it for now. Have fun!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forum.unity3d.com/threads/78037-AI-Pathfinding-in-Unity-Path&quot; title=&quot;Path thread on the Unity forum&quot;&gt;Unity forum thread&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2011-02-15 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/02/15/path-2-released/</link>
			</item>
			
		
			
			<item>
				<title>Assembling and assimilating</title>
				<description>&lt;p&gt;So this post has been delayed for quite a while&amp;#8230; One question I got from many sources after my Advanced Editor Scripting talk with Adam Mechtley at Unite &amp;#8217;10 was &amp;#8220;so how did you do that assembly building thing?&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Well I did it before we had a port of MonoDevelop available, so my options were limited. Now that we do have that port, you&amp;#8217;ll be able to redo this exercise in there with some &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; drag-drop nicenessness. However, just because I can (and because it is healthy learning and lovely hacky) I will provide the command-line/perl script solution, which is still my approach.&lt;/p&gt;
&lt;p&gt;First a quick &amp;#8220;why&amp;#8221;: As mentioned in my Unite talk, there are three reasons I wrap my projects in .net assemblies before distributing &amp;#8211; and no it&amp;#8217;s got nothing to do with keeping the source secure &amp;#8211; assemblies are &lt;b&gt;easily&lt;/b&gt; decompiled:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Reduce deployment clutter. If I were to release Behave without being wrapped in assembly, it would span around 150 &amp;#8211; 170 source files and textures in various folder configurations. Now I have two folders, three assemblies and about five script files.&lt;/li&gt;
	&lt;li&gt;Reduce funky bug reports. While .net assemblies are very easily disassembled, it does at least take some dedication to do so. More than it takes to randomly change something in a full source distribution when things don&amp;#8217;t go your way. So assemblies help you get rid of a portion of those really long bug reports which end up with &amp;quot;oh, by the way, I changed this one thing in your distribution &amp;#8211; you think that might have something to do with it?.&lt;/li&gt;
	&lt;li&gt;They can load in at runtime. This is really cool and quite useful if applicable to your scenario &amp;#8211; for more information, check out this other tips and tricks post: &lt;a href=&quot;http://angryant.com/general/tipsandtricks/downloading-the-hydra/&quot; target=&quot;_parent&quot;&gt;downloading the hydra&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this post I am going to show you how to build your scripts into a .net assembly (.dll) and add it to your Unity project. And just to spice things up, lets take that in reverse: Once your assembly is built, copy that bastard into your Assets folder. Done.&lt;/p&gt;
&lt;p&gt;Easy, right? Now, let&amp;#8217;s take a look at the assembly building. And, before you start, yes this will run on all Unity supported platforms and no it does not require pro &amp;#8211; run this on the base Unity license without issues.&lt;/p&gt;
&lt;h2&gt;Setup&lt;/h2&gt;
&lt;p&gt;So first off, if you are on windows, you&amp;#8217;ll be needing a perl install. I usually got for ActivePerl. Not saying it is more awesomerer than anything else out there &amp;#8211; just that I know it and it usually works just fine. If you are on OS X, you&amp;#8217;re in luck, as perl comes preinstalled.&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s get perl hacking. This is in no way meant as a &amp;#8220;my first perl script&amp;#8221; guide. We&amp;#8217;re just getting introduced to a means to an end &amp;#8211; and it is not going to be pretty. So first off, create a new text file in your favorite text editor and save it as build.pl. Start the file off like so:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-1.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;#/usr/local/bin/perl

use strict;
use Getopt::Long;
use Term::ANSIColor;
use File::Basename;
use File::Spec;
chdir (File::Spec-&amp;amp;gt;rel2abs (dirname($0)));

our $compiler = &amp;amp;quot;/Applications/Unity/Unity.app/Contents/Frameworks/Mono/bin/gmcs&amp;amp;quot;;
our $assemblyUnityEngine = &amp;amp;quot;/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll&amp;amp;quot;;
our $assemblyUnityEditor = &amp;amp;quot;/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll&amp;amp;quot;;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Now, that was a bit of a mouthful, but it should be pretty straight-forward. Lines three through eight include a lot of perl functionality we will be using later. And actually the last two ones are already used in line nine. Here we&amp;#8217;re ensuring that the rest of the script is being executed in the context of the folder containing the file.&lt;/p&gt;
&lt;p&gt;In the next few lines of interest, three variables are declared &amp;#8211; pathes to the mono compiler shipped with Unity and the UnityEngine and UnityEditor assemblies. Notice that these are OS X pathes, for a windows setup (or if you installed Unity into a different folder than the default), you&amp;#8217;ll need to correct these.&lt;/p&gt;
&lt;h2&gt;Debug command-line parameter&lt;/h2&gt;
&lt;p&gt;Next up, let&amp;#8217;s add support for command-line parameters. &amp;#8220;Why?&amp;#8221; you ask &amp;#8211; because they are going to be awesome for debugging our assembly later. The only command-line parameter we will be supporting for now is &amp;#8220;&amp;#8212;release&amp;#8221;. This will basically let us toggle, when building the assembly, a bunch of logging and other stuff on or off. This is what it looks like:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-2.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;my $optionRelease = 0;

GetOptions (
	&amp;amp;quot;release&amp;amp;quot; =&amp;amp;gt; \$optionRelease
);&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;We declare a variable named optionRelease, initialize it to zero and then call GetOptions, telling it to pass data on the use of the &amp;#8220;release&amp;#8221; parameter into our variable. Now, GetOptions has a bunch of functionality, but the way we use it here, it simply assigns one or zero to our variable &amp;#8211; depending on whether the parameter is used or not.&lt;/p&gt;
&lt;p&gt;Next up, we need to use this variable to affect the parameters we pass to the gmcs compiler. Like so:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-3.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;my $debugOptions = $optionRelease == 0 ? &amp;amp;quot;-d:DEBUG&amp;amp;quot; : &amp;amp;quot;&amp;amp;quot;;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;The idea here is that gmcs takes a parameter -d:[name] which instructs it to, during pre-processing, run with the symbol [name] defined. Something we can work with in our code like this:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=AssemblyTest-1.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;#if DEBUG
	Debug.Log (&amp;amp;quot;I&amp;amp;#39;m only visible in debug builds!&amp;amp;quot;);
#endif&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;h2&gt;Building two assemblies&lt;/h2&gt;
&lt;p&gt;Next up, a bit of info. Since Unity 3, we&amp;#8217;ve enforced that scripts and assembly depending on UnityEditor, even if not using that, cannot be included in builds. This means that if you have some editor scripts, you would also like built to assembly, you will need to split these out into a different assembly than the one containing your runtime scripts.&lt;/p&gt;
&lt;p&gt;Lets&amp;#8217;s assume that is the case for this exercise, that the runtime scripts are located in Source/ and that the editor scripts are located in Source/Editor. So we will have to build two assemblies. That could mean code duplication, which should cause anyone pain, so let&amp;#8217;s be nice and wrap some of the building up in a perl subroutine:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-4.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;sub BuildAssembly
{
	our $compiler;

	my $target = shift;
	my $out = shift;
	my $arguments = shift;
	my $source = shift;

	print (&amp;amp;quot;Compiling $out\n&amp;amp;quot;);
	print color (&amp;amp;quot;blue&amp;amp;quot;), &amp;amp;quot;$compiler -target:$target -out:$out $arguments $source\n&amp;amp;quot;;
	print color (&amp;amp;quot;red&amp;amp;quot;);
	system (&amp;amp;quot;$compiler -target:$target -out:$out $arguments $source&amp;amp;quot;) and die (&amp;amp;quot;Compilation of $out failed.&amp;amp;quot;);
	print color (&amp;amp;quot;reset&amp;amp;quot;);
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Let&amp;#8217;s take this subroutine line by line. First off we pull in the global variable &amp;#8220;compiler&amp;#8221;. After this, we populate the variables target, out, arguments and source from subroutine parameters. With these at hand, the fun begins. First off, we print out the name of our build target (MyAwesome.dll) and the command we&amp;#8217;re planning to execute &amp;#8211; marked in fashionable blue.&lt;/p&gt;
&lt;p&gt;Second we actually do the building &amp;#8211; colouring any compiler output red (no news is good news &amp;#8211; output is bad). If compilation fails, we kill the script &amp;#8211; allowing the user to take action. If all went well, we remember to reset the colouring before returning from the subroutine.&lt;/p&gt;
&lt;p&gt;So how about some use of this subroutine, eh?&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-5.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;BuildAssembly (&amp;amp;quot;library&amp;amp;quot;, &amp;amp;quot;Awesomenessness.Runtime.dll&amp;amp;quot;, &amp;amp;quot;Source/*.cs&amp;amp;quot;, &amp;amp;quot;-d:RUNTIME $debugOptions -r:$assemblyUnityEngine&amp;amp;quot;);
BuildAssembly (&amp;amp;quot;library&amp;amp;quot;, &amp;amp;quot;Awesomenessness.Editor.dll&amp;amp;quot;, &amp;amp;quot;Source/Editor/*.cs&amp;amp;quot;, &amp;amp;quot;-d:EDITOR $debugOptions -r:Awesomenessness.Runtime.dll,$assemblyUnityEngine,$assemblyUnityEditor&amp;amp;quot;);&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;As you see, we first build the runtime assembly from Source/*.cs, with the &lt;span class=&quot;caps&quot;&gt;RUNTIME&lt;/span&gt; and optionally the &lt;span class=&quot;caps&quot;&gt;DEBUG&lt;/span&gt; symbol defined. We also make sure to include the UnityEngine assembly in the building, so that you can reference stuff from the UnityEngine namespace.&lt;/p&gt;
&lt;p&gt;In the second line, we build the editor assembly &amp;#8211; containing all our editor code from Source/Editor/*.cs. This time we define the &lt;span class=&quot;caps&quot;&gt;EDITOR&lt;/span&gt; and optionally the &lt;span class=&quot;caps&quot;&gt;DEBUG&lt;/span&gt; symbol during building. This assembly references not only the UnityEngine assembly, but also the UnityEditor one and the runtime assembly which was just built in the line above.&lt;/p&gt;
&lt;h2&gt;Distribution&lt;/h2&gt;
&lt;p&gt;And that&amp;#8217;s about it! As mentioned early in this post, all you need to do in order to include these assemblies in your project is to drag them into your assets folder, but if you&amp;#8217;re very nice, you could just make that copy a part of the build script:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=build-6.pl'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;system (&amp;amp;quot;cp Awesomenessness.Runtime.dll Test\\ project/Assets/Awesomenessness&amp;amp;quot;);
system (&amp;amp;quot;cp Awesomenessness.Editor.dll Test\\ project/Assets/Awesomenessness/Editor&amp;amp;quot;);&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Notice that this uses the OS X cp command-line tool. For windows, replace with equivalent.&lt;/p&gt;
&lt;h2&gt;Limitation: Editor classes in assemblies&lt;/h2&gt;
&lt;p&gt;While MonoBehaviours can live just fine in assemblies, editor scripts (ScriptableObject derived classes) come with a limitation (currently still active, as of Unity 3.1): You can not initialize these classes via UnityEditor &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; calls. That would be calls like ScriptableObject.CreateInstance and EditorWindow.GetWindow.&lt;/p&gt;
&lt;p&gt;However &amp;#8211; you can create instances of classes via &amp;#8220;new&amp;#8221; just fine and you can derive scripts located outside of the assembly and instantiate those via UnityEditor calls without incident. Say for example that MyEditorWindow derives from EditorWindow and is located in an assembly. Now I cannot instantiate it via GetWindow, but if I create a .cs file in my assets folder containing a class which does nothing but inherit from MyEditorWindow, then that class can be instantiated via GetWindow just fine and will have the exact same behaviour.&lt;/p&gt;
&lt;h2&gt;Extra trick: Including resources in the assembly&lt;/h2&gt;
&lt;p&gt;For extra points, you can include resources, such as textures, in your assembly. This has the bonus of limiting the clutter of your distribution even more.&lt;/p&gt;
&lt;p&gt;Including the resource in your build is as simple as appending the &amp;#8220;-resource:[path]&amp;#8221; parameter to your gmcs build command. This will add the bytes into the assembly manifest &amp;#8211; under the name of the original file. You can fetch these bytes at runtime, using that name. For example, here&amp;#8217;s some utility methods for fetching textures:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=AssemblyTest-2.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;public static Stream GetResourceStream (string resourceName, Assembly assembly)
{
	if (assembly == null)
	{
		assembly = Assembly.GetExecutingAssembly ();
	}

	return assembly.GetManifestResourceStream (resourceName);
}


public static Stream GetResourceStream (string resourceName)
{
	return GetResourceStream (resourceName, null);
}


public static byte[] GetByteResource (string resourceName, Assembly assembly)
{
	Stream byteStream = GetResourceStream (resourceName, assembly);
	byte[] buffer = new byte[byteStream.Length];
	byteStream.Read (buffer, 0, (int)byteStream.Length);
	byteStream.Close ();

	return buffer;
}


public static byte[] GetByteResource (string resourceName)
{
	return GetByteResource (resourceName, null);
}


public static Texture2D GetTextureResource (string resourceName, Assembly assembly)
{
	Texture2D texture = new Texture2D (4, 4);
	texture.LoadImage (GetByteResource (resourceName, assembly));

	return texture;
}


public static Texture2D GetTextureResource (string resourceName)
{
	return GetTextureResource (resourceName, null);
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Given that you added &amp;#8220;-resource:path/to/Logo.png&amp;#8221; to your gmcs build command, you will with the above utility methods be able to fetch that into a texture like so:&lt;/p&gt;
&lt;script src='https://gist.github.com/3165387.js?file=AssemblyTest-3.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;Texture2D logoTexture = GetTextureResource (&amp;amp;quot;Logo.png&amp;amp;quot;);&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Well, I hope you guys found some of this useful! I&amp;#8217;ll see if I can&amp;#8217;t do a follow-up on how to do this in MonoDevelop.&lt;/p&gt;</description>
				<published>2011-02-02 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/02/02/assembling-and-assimilating/</link>
			</item>
			
		
			
			<item>
				<title>Path 2 intro screencast</title>
				<description>&lt;p&gt;As promised &amp;#8211; a quick screencast of how to set up and use the Path 2 beta:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;/resources/path/Path2.mov&quot;&gt;Path 2.0b1 quick intro&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2011-01-29 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/01/29/path-2-intro-screencast/</link>
			</item>
			
		
			
			<item>
				<title>Path 2 beta release for GGJ</title>
				<description>&lt;p&gt;With the Global Game Jam underway, I figured I would do an early beta release of Path 2. While I&amp;#8217;m home with the flu &amp;#8211; not able to participate in the Nordic Game Jam myself, I might as well do a bit of documentation on this thing and see if anyone finds it useful.&lt;/p&gt;
&lt;p&gt;So documentation is on the way, but the Path2 package is available from the &lt;a href=&quot;/path/download&quot;&gt;download&lt;/a&gt; section right now &amp;#8211; as is the demo seeker script.&lt;/p&gt;
&lt;p&gt;Path 2.0b1 feature set:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Throttle-able, co-routine driven seeker jobs for maximum performance.&lt;/li&gt;
	&lt;li&gt;Super simple Navigator.targetPosition interface.&lt;/li&gt;
	&lt;li&gt;Additional. Navigator.RequestPath interface.&lt;/li&gt;
	&lt;li&gt;Very straight forward and powerful editor interface.&lt;/li&gt;
	&lt;li&gt;Waypoint auto-connect and auto-scale empowering network authoring.&lt;/li&gt;
	&lt;li&gt;Custom weights based on the Unity built-in tags system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No release schedule yet. Documentation as I can have it ready. Have fun!&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m off to recording a screen cast of this.&lt;/p&gt;</description>
				<published>2011-01-29 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/01/29/path-2-beta-release-for-ggj/</link>
			</item>
			
		
			
			<item>
				<title>AIgameDev master class video now online</title>
				<description>&lt;p&gt;For those of you who didn&amp;#8217;t have a chance to dial in live, but would still like to view the master class I did for AIgameDev last year: The video recording is now available here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aigamedev.com/premium/masterclass/unity-behave/&quot;&gt;http://aigamedev.com/premium/masterclass/unity-behave/&lt;/a&gt;&lt;/p&gt;</description>
				<published>2011-01-25 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/01/25/aigamedev-master-class-video-now-online-3/</link>
			</item>
			
		
			
			<item>
				<title>Expanding beta</title>
				<description>&lt;p&gt;Due to an increasing number of users, I&amp;#8217;ve decided to expand the Behave beta testing group.&lt;/p&gt;
&lt;p&gt;You will find more information on this and how to join in the &amp;#8220;Beta&amp;#8221; page of the &amp;#8220;Behave&amp;#8221; section on this site &amp;#8211; &lt;a href=&quot;http://angryant.com/behave/beta/&quot;&gt;http://angryant.com/behave/beta&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2011-01-09 00:00:00 +0100</published>
				<link>http://www.angryant.com/2011/01/09/expanding-beta/</link>
			</item>
			
		
			
			<item>
				<title>Behave AIgameDev master class public stream</title>
				<description>&lt;p&gt;Hey guys &amp;#8211; as promised, the live stream is now just about ready to go. The clock reads about ten minutes to impact, so join up!&lt;/p&gt;
&lt;p&gt;The direct link is available in the following forum post:
&lt;a href=&quot;http://forum.unity3d.com/threads/68843-Behave-master-class-on-AIgameDev/&quot;&gt;http://forum.unity3d.com/threads/68843-Behave-master-class-on-AIgameDev&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-11-28 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/11/28/behave-aigamedev-master-class-public-stream/</link>
			</item>
			
		
			
			<item>
				<title>Behave master class on open AIgameDev stream tomorrow</title>
				<description>&lt;p&gt;Hey guys. Just a quick reminder here. Tomorrow I am doing the AIgameDev masterclass on Behave (times below). Alex of AIgameDev has been so kind as to make the stream publicly available. That&amp;#8217;s right &amp;#8211; no membership or subscription needed. Notice though that access to the stored video will still require a paid subscription, so don&amp;#8217;t miss out! Drop by tomorrow.&lt;/p&gt;
&lt;p&gt;Keep tabs on this site, as I&amp;#8217;ll be linking to a forum post with the stream link when it&amp;#8217;s available.&lt;/p&gt;
&lt;p&gt;Masterclass time: 22:00 European time, 16:00 East Coast, 13:00 Pacific time, 21:00 U.K.&lt;/p&gt;</description>
				<published>2010-11-27 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/11/27/behave-master-class-on-open-aigamedev-stream-tomorrow/</link>
			</item>
			
		
			
			<item>
				<title>Interview with AIGameDev</title>
				<description>&lt;p&gt;November 28th I&amp;#8217;m doing a live interview with Alex Champandard of AIGameDev.com on the subject of Behave. We will be going in depth into how the tool is used, a bit of the back end and do a demo.&lt;/p&gt;
&lt;p&gt;Drop by. It&amp;#8217;ll be fun!&lt;/p&gt;
&lt;p&gt;Time: 22:00 European time, 16:00 East Coast, 13:00 Pacific time, 21:00 U.K.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aigamedev.com/premium/event/session-behave-unity/&quot;&gt;http://aigamedev.com/premium/event/session-behave-unity/&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-10-29 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/29/interview-with-aigamedev/</link>
			</item>
			
		
			
			<item>
				<title>New video: From tree to code</title>
				<description>&lt;p&gt;Hey guys!&lt;/p&gt;
&lt;p&gt;This morning I recorded a video as a guide on how to go from installing Behave to using a behaviour tree in a script. I hope you guys find it useful.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/resources/behave/FromTreeToCode.mov&quot;&gt;From tree to code&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-10-24 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/24/new-video-from-tree-to-code/</link>
			</item>
			
		
			
			<item>
				<title>Issue tracking on github Behave release project</title>
				<description>&lt;p&gt;Hey guys&lt;/p&gt;
&lt;p&gt;Per request, I&amp;#8217;ve now set up a means of reporting issues and feature requests. I decided to do this though the github issue tracking system. You&amp;#8217;ll be able to track and report any issues or feature requests at this &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/AngryAnt/Behave-release/issues/&quot;&gt;http://github.com/AngryAnt/Behave-release/issues&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Similarly, please use the Behave release thread on the Unity forums for questions and discussions on Behave:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released/&quot;&gt;http://forum.unity3d.com/threads/61849-AI-Behaviour-trees-in-Unity-Behave-1.1-released&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-10-23 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/23/issue-tracking-on-github-behave-release-project/</link>
			</item>
			
		
			
			<item>
				<title>IT University Copenhagen Unity course completed</title>
				<description>&lt;p&gt;Hey guys!&lt;/p&gt;
&lt;p&gt;So that was the last of the five days of &amp;#8220;Exploring with Unity&amp;#8221; course at the Copenhagen IT University. Thanks for having us. It has been good fun.&lt;/p&gt;
&lt;p&gt;Sorry about the broken link to the files from Thursday. This is now fixed, and the files from today&amp;#8217;s lecture are available from this (verified) link:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/themes/angryant/downloads/ITUCourse2010/Friday.zip&quot;&gt;Friday&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2010-10-22 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/22/it-university-copenhagen-unity-course-completed/</link>
			</item>
			
		
			
			<item>
				<title>IT University Copenhagen Unity course files Thursday</title>
				<description>&lt;p&gt;Hey guys!&lt;/p&gt;
&lt;p&gt;Attached to this post, you&amp;#8217;ll find the projects and resources used on today&amp;#8217;s lecture:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/themes/angryant/downloads/ITUCourse2010/Thursday.zip&quot;&gt;Thursday&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2010-10-21 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/21/it-university-copenhagen-unity-course-files-thursday/</link>
			</item>
			
		
			
			<item>
				<title>CPH IT University Unity course files</title>
				<description>&lt;p&gt;Hey guys.&lt;/p&gt;
&lt;p&gt;For those of you not attending; Joe Robins and I are running a Unity course at the IT University of Copenhagen this week. Given the highly mixed crowd, the our lectures range from absolutely no Unity knowledge required to at least some understanding needed for full potential unlock.&lt;/p&gt;
&lt;p&gt;During these lectures, we create projects for demoing the focus of the lecture. These are either pre-prepared or built on stage and often get modified based on requests from the audience.&lt;/p&gt;
&lt;p&gt;So now that we are all on the same track:
Attached to this post you should find three zip files of the content we have gone through in the classes so far. This is their state post responding to questions, so some of the stuff demoed earlier on might differ slightly.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/themes/angryant/downloads/ITUCourse2010/Monday.zip&quot;&gt;Monday&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/themes/angryant/downloads/ITUCourse2010/Tuesday.zip&quot;&gt;Tuesday&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/themes/angryant/downloads/ITUCourse2010/Wednesday.zip&quot;&gt;Wednesday&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2010-10-20 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/20/cph-it-university-unity-course-files/</link>
			</item>
			
		
			
			<item>
				<title>Behave 1.2 released</title>
				<description>&lt;p&gt;That&amp;#8217;s right! I know it&amp;#8217;s only been &amp;#8230; uh &amp;#8230; well less time than I usually take to get it together and push out a new version. But since I was a bit on a roll with the release of Behave 1.1 not too long ago, and given that a last minute bug has snuck into that release, I decided to push on.&lt;/p&gt;
&lt;p&gt;So here we are &amp;#8211; new version out in a jiffy. What&amp;#8217;s new you say? This is what&amp;#8217;s new:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Fixed release building.&lt;/li&gt;
	&lt;li&gt;Added the priority selector, introducing the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; points:
	&lt;ul&gt;
		&lt;li&gt;int IAgent.SelectTopPriority (Tree sender, params int[] IDs);&lt;/li&gt;
		&lt;li&gt;enum BL[LibraryName].PriorityType { PriorityName, &amp;#8230;, Unknown };&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Added support for branch contexts, introducing the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; points:
	&lt;ul&gt;
		&lt;li&gt;enum BL[LibraryName].ContextType { ContextName, &amp;#8230;, Unknown };&lt;/li&gt;
		&lt;li&gt;int Tree.ActiveContext { get; }&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Changed IAgent interface:
	&lt;ul&gt;
		&lt;li&gt;Tick (bool init, Tree sender) &amp;#8594; Tick (Tree sender, bool init)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Added &amp;#8220;Select asset&amp;#8221; button to the standard inspector.&lt;/li&gt;
	&lt;li&gt;Interface polish.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;ll make sure to update the documentation to reflect the new &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; changes and yes, more is coming on that front.&lt;/p&gt;
&lt;p&gt;And yes I will be releasing a new demo project. I just wanted to make it something different, and nice for you guys, y&amp;#8217;know? So hang in there.&lt;/p&gt;</description>
				<published>2010-10-11 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/10/11/behave-1-2-released/</link>
			</item>
			
		
			
			<item>
				<title>Video: Behave - starting from scratch</title>
				<description>&lt;p&gt;I just finished uploading a new video for the Behave documentation section. It is a brief general introduction to the Behave authoring environment and shows you how to get up and running with Behave from a blank project.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;/behave/documentation/&quot;&gt;The documentation page&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/resources/behave/StartingFromScratch.mov&quot;&gt;Direct link to the video&lt;/a&gt;.
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2010-09-29 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/09/29/video-behave-starting-from-scratch/</link>
			</item>
			
		
			
			<item>
				<title>Behave runtime documentation updated</title>
				<description>&lt;p&gt;It is no secret that the Behave documentation has been in a quite bad state for a while. With this release I intend to correct that and as a starting point, I have moved the outdated documentation offline and replaced it with documentation of the Behave runtime. Rest assured that I will be adding documentation on the authoring environment as well.&lt;/p&gt;
&lt;p&gt;Go check it out: &lt;a href=&quot;/behave/documentation/&quot;&gt;http://angryant.com/behave/documentation&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-09-29 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/09/29/behave-runtime-documentation-updated/</link>
			</item>
			
		
			
			<item>
				<title>Behave 1.1 released</title>
				<description>&lt;p&gt;Hello reader. It&amp;#8217;s been quite a while since my last conf&amp;#8230; post.&lt;/p&gt;
&lt;p&gt;Yea sorry about that. Busy, busy, but then again I suppose most had probably &lt;a href=&quot;http://unity3d.com/unity/&quot;&gt;figured that one out&lt;/a&gt;. However, I have had a bit of time here and there over the last few months to polish away on Behave and keep it compatible with Unity 3 as it developed.&lt;/p&gt;
&lt;p&gt;A lot of this keeping up to date work at times resulted in some good old fashion rewrites &amp;#8211; like the entire asset handling and parts of the compiler. This is probably not very interesting to you, but it is quite so to me as it has allowed me to restructure internally in ways that make the system as a whole more flexible and ready for change and additions.&lt;/p&gt;
&lt;p&gt;One of those additions which I did sneak in next to the polish and updating is a new debugger. The in-game debugger has been thrown out in favour of one living in your editor environment. &lt;span class=&quot;caps&quot;&gt;YAY&lt;/span&gt;! No really, yay. You will like this and not just because I say so. Ah and as much requested this one actually dives into sub-trees, making it actually quite useful compared to its predecessor.&lt;/p&gt;
&lt;p&gt;Oh and the compiler runs on Windows too now. And I also shaved off some cruft in the action/decorator handler syntax, making &lt;a href=&quot;http://arges-systems.com&quot;&gt;Ricardo&lt;/a&gt; extra happy.&lt;/p&gt;
&lt;p&gt;I will be putting up some short documentation for Behave 1.1 shortly, but if you still haven&amp;#8217;t decided to download yet, here is a short teaser on the new debugger: &lt;a href=&quot;http://angryant.com/Debugger.mov&quot;&gt;This text is a link to a movie file. Click it. It will be fun!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enough blabbering though. The package is available in the download section and the changelog is right here:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Made compatible with Unity 3.0 &amp;#8211; including ensuring that the 2.5-2.6.1 bug preventing compilation on Windows is fixed on the Unity side.&lt;/li&gt;
	&lt;li&gt;UI tweaks and polish.&lt;/li&gt;
	&lt;li&gt;Added the option to have return values of nodes be inverted.&lt;/li&gt;
	&lt;li&gt;Fixed compiler bug when facing sequence or selector with only one child node.&lt;/li&gt;
	&lt;li&gt;Renamed Library.Tree &amp;#8594; Library.InstantiateTree.&lt;/li&gt;
	&lt;li&gt;Added Tree.Tick () and Tree.Reset () methods using the IAgent instance given at instantiation of the tree.&lt;/li&gt;
	&lt;li&gt;Removed the abstract Library class.&lt;/li&gt;
	&lt;li&gt;Changed generated library class:
	&lt;ul&gt;
		&lt;li&gt;Trees &amp;#8594; TreeType.&lt;/li&gt;
		&lt;li&gt;Actions &amp;#8594; ActionType.&lt;/li&gt;
		&lt;li&gt;Decorators &amp;#8594; DecoratorType.&lt;/li&gt;
		&lt;li&gt;Tree InstantiateTree (int, IAgent) &amp;#8594; static Tree InstantiateTree (TreeType, IAgent)&lt;/li&gt;
		&lt;li&gt;int TreeID (Tree) &amp;#8594; static TreeType Type (Tree)&lt;/li&gt;
		&lt;li&gt;bool IsAction (int) &amp;#8594; static bool IsAction (int)&lt;/li&gt;
		&lt;li&gt;bool IsDecorator (int) &amp;#8594; static bool IsDecorator (int)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Upped editor performance.&lt;/li&gt;
	&lt;li&gt;New asset structure change with automatic import of Behave 1.0 assets.&lt;/li&gt;
	&lt;li&gt;Changed action and decorator handlers. These are now the handlers mapped:
	&lt;ul&gt;
		&lt;li&gt;public BehaveResult Init[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);&lt;/li&gt;
		&lt;li&gt;public BehaveResult Tick[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);&lt;/li&gt;
		&lt;li&gt;public void Reset[Name][Action/Decorator] (Tree sender, string stringParameter, float floatParameter, IAgent agent, object data);&lt;/li&gt;
		&lt;li&gt;public BehaveResult Init[Name][Action/Decorator] (Tree sender);&lt;/li&gt;
		&lt;li&gt;public BehaveResult Tick[Name][Action/Decorator] (Tree sender);&lt;/li&gt;
		&lt;li&gt;public void Reset[Name][Action/Decorator] (Tree sender);&lt;/li&gt;
		&lt;li&gt;public BehaveResult [Name][Action/Decorator] {get; set;}&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Added support for collection duplication.&lt;/li&gt;
	&lt;li&gt;Moved debug rendering into the editor with its own dedicated debugger window, including actor listing.&lt;/li&gt;
	&lt;li&gt;Debugger now renders active sub-trees as well.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Oh and if you are upgrading a previous Behave install in a project, please see Readme.txt for details on snags you might hit and how to solve the whole thing in 4-5 steps.&lt;/p&gt;
&lt;p&gt;Ah and one more thing: Behave 1.1 removes the &amp;#8220;only for non-commercial work&amp;#8221; clause from the license.&lt;/p&gt;
&lt;p&gt;Have fun! And remember to tell me about all your awesome projects!&lt;/p&gt;</description>
				<published>2010-09-29 00:00:00 +0200</published>
				<link>http://www.angryant.com/2010/09/29/behave-1-1-released/</link>
			</item>
			
		
			
			<item>
				<title>FAFF cleanup: Sketch</title>
				<description>&lt;p&gt;As some of you might have read, at Unity we have a thing called &lt;a href=&quot;http://blogs.unity3d.com/2009/11/18/fridays-are-for-fun/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;FAFF&lt;/span&gt;&lt;/a&gt; &amp;#8211; very much the same as Google and other IT businesses are doing. It generally lets you step out of the bit stream for a day and just, during work hours, go with whatever crazy idea(s) you&amp;#8217;ve been throwing around.&lt;/p&gt;
&lt;p&gt;Some of these ideas are pushed into the product later and others are just filed under &amp;#8220;something to play with when bored&amp;#8221; and &amp;#8220;now I can stop wondering about that&amp;#8221;. Sketch was a micro &lt;span class=&quot;caps&quot;&gt;FAFF&lt;/span&gt; project I just remembered I had filed under &amp;#8220;this was fun&amp;#8221; and then forgot all about. Since then I&amp;#8217;ve continued work on other projects and started new ones &amp;#8211; in all likelihood I&amp;#8217;ll not return to this project.&lt;/p&gt;
&lt;p&gt;So I figured I&amp;#8217;d push it to github and let you guys take it for a spin. If nothing else, it&amp;#8217;s a nice demo of what you can do with Unity editor scripting.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://eej.dk/angryant/wp-content/uploads/2010/03/Sketch.png&quot; title=&quot;Sketch&quot;&gt;&lt;img src=&quot;http://eej.dk/angryant/wp-content/uploads/2010/03/Sketch-300x202.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The idea of Sketch is to have simple tools inside the Unity editor to modify meshes in your assets. My goal with the project was never to turn Unity into a mesh authoring environment, but rather to give people an extra tool for rapid prototyping.&lt;/p&gt;
&lt;p&gt;So what&amp;#8217;s in there now? The simplest I could think of: Triangle selection and movement.&lt;/p&gt;
&lt;p&gt;Workflow:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Go to the GameObject &amp;#8594; Create Other menu and click Sketch Cube.&lt;/li&gt;
	&lt;li&gt;With the cube selected, click a triangle and with the handle that appears, drag it around to modify the mesh.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;GOTO&lt;/span&gt; 1.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Alternatively, you could drag in your own mesh from the Assets folder (make sure that it generates a mesh collider in its import settings) and attach the Sketch script to it.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;NOTICE&lt;/span&gt;: Sketch modifies the imported asset. This means that:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;If you modify a some of the basic geometry meshes (such as GameObject &amp;#8594; Create Other &amp;#8594; Cube), the changes will apply to all cubes until editor relaunch.&lt;/li&gt;
	&lt;li&gt;If the geometry you&amp;#8217;re modifying is based on an imported 3D asset, reimporting it will mean you loose your changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Structure-wise, Sketch consists of two components: A MonoBehaviour (Sketch/Sketch.cs) and a custom inspector (Sketch/Editor/SketchEditor.cs). The purpose of the MonoBehaviour is merely to do some bookkeeping and provide utility functions (it will even destroy itself at runtime) while the custom inspector holds the logic for doing the modifications.&lt;/p&gt;
&lt;p&gt;Woah. That&amp;#8217;s a lot of talk. Here&amp;#8217;s the repository &amp;#8211; go nuts: &lt;a href=&quot;http://github.com/AngryAnt/Sketch/&quot;&gt;http://github.com/AngryAnt/Sketch&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2010-03-19 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/03/19/faff-cleanup-sketch/</link>
			</item>
			
		
			
			<item>
				<title>Building a menu of delegates and enums</title>
				<description>&lt;p&gt;I like delegates. I also like enums. Furthermore, I happen to be part of a small group of people who actually enjoy the immediate mode &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; system in Unity. And I want you to like it too :)&lt;/p&gt;
&lt;p&gt;So &amp;#8211; menus. After having observed quite a few very funky approaches, in the &lt;a href=&quot;http://www.unifycommunity.com/wiki/index.php?title=IRC&quot;&gt;&lt;span class=&quot;caps&quot;&gt;IRC&lt;/span&gt;&lt;/a&gt; channel, to building main menu functionality and giving advice in there, I decided to sow together those ideas into a short example.&lt;/p&gt;
&lt;p&gt;The main idea here is to be able to build and manage a menu system quickly and easily. This line adds a new submenu to the system &amp;#8211; designated MyMenuState and implemented in the OnMyMenuGUI method:
&lt;script src='https://gist.github.com/3806175.js?file=NewSubmenu.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;m_Menus [MenuState.MyMenuState] = OnMyMenuGUI;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Notice that since we&amp;#8217;re using delegates, the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; method needn&amp;#8217;t be implemented in the same script and could even  live on an entirely different GameObject. Why is this so clever (besides enums and delegates being cool)? Because managing and switching between menus set up like this is insanely easy. This is the central &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; method for the menu system:
&lt;script src='https://gist.github.com/3806175.js?file=OnGUI.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;public void OnGUI ()
{
	m_Menus [m_CurrentState] ();
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And this is &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; code inside a menu &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; method for switching to a different submenu:
&lt;script src='https://gist.github.com/3806175.js?file=SwitchMenu.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;m_CurrentState = GUILayout.Button (&amp;amp;quot;Credits&amp;amp;quot;) ? MenuState.Credits : m_CurrentState;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;So there. Enough talk. Have some example code:
&lt;script src='https://gist.github.com/3806175.js?file=Menu.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;
using System.Collections.Generic;&lt;/p&gt;
&lt;p&gt;public class Menu : MonoBehaviour
{
	delegate void OnGUIImplementation();
	public enum MenuState {Main,Settings,Credits};
	public struct Settings
	{
		public bool m_ThisSetting, m_ThatSetting, m_TheOtherSetting;
	};
	static Vector2 m_StandardMenuSize = new Vector2 (200.0f, 300.0f);
	static string m_LogoURL = &amp;quot;http://download.unity3d.com/images/top-menu/mm_unity_icon.png&amp;quot;;
	static Texture2D m_Logo = null;&lt;/p&gt;
&lt;p&gt;private MenuState m_CurrentState = MenuState.Main;
	private Dictionary m_Menus;
	private Settings m_Settings;&lt;/p&gt;
&lt;p&gt;void Awake ()
	{
		m_Menus = new Dictionary ();
		m_Menus [MenuState.Main] = OnMainMenuGUI;
		m_Menus [MenuState.Settings] = OnSettingsGUI;
		m_Menus [MenuState.Credits] = OnCreditsGUI;
		StartCoroutine (GetLogo ());
	}&lt;/p&gt;
&lt;p&gt;IEnumerator GetLogo ()
	{
		&lt;span class=&quot;caps&quot;&gt;WWW&lt;/span&gt; www = new &lt;span class=&quot;caps&quot;&gt;WWW&lt;/span&gt; (m_LogoURL);&lt;/p&gt;
&lt;p&gt;yield return www;&lt;/p&gt;
&lt;p&gt;if (www.error == null)
		{
			m_Logo = www.texture;
		}
	}&lt;/p&gt;
&lt;p&gt;public void OnGUI ()
	{
		m_Menus [m_CurrentState] ();
	}&lt;/p&gt;
&lt;p&gt;static void BeginStandardMenu (string title)
	{
		GUILayout.BeginArea (new Rect ((Screen.width &amp;#8211; m_StandardMenuSize.x) * 0.5f, (Screen.height &amp;#8211; m_StandardMenuSize.y) * 0.5f, m_StandardMenuSize.x, m_StandardMenuSize.y));
			GUILayout.BeginVertical (&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.skin.GetStyle (&amp;quot;Box&amp;quot;));
				GUILayout.Label (title, &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.skin.GetStyle (&amp;quot;Box&amp;quot;));
	}&lt;/p&gt;
&lt;p&gt;static void EndStandardMenu ()
	{
		Color color;&lt;/p&gt;
&lt;p&gt;GUILayout.BeginHorizontal ();
					GUILayout.FlexibleSpace ();
						color = &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.color;
						&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.color = Color.grey;
						GUILayout.Label (&amp;quot;My game version 2.4X&amp;quot;);
						&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.color = color;
					GUILayout.FlexibleSpace ();
				GUILayout.EndHorizontal ();
			GUILayout.EndVertical ();
		GUILayout.EndArea ();
	}&lt;/p&gt;
&lt;p&gt;void OnMainMenuGUI ()
	{
		BeginStandardMenu (&amp;quot;Main menu&amp;quot;);
			if (m_Logo != null)
			{
				GUILayout.BeginHorizontal ();
					GUILayout.FlexibleSpace ();
						GUILayout.Label (m_Logo);
					GUILayout.FlexibleSpace ();
				GUILayout.EndHorizontal ();
			}
			if (GUILayout.Button (&amp;quot;New game&amp;quot;))
			{
				Application.LoadLevel (&amp;quot;Level one&amp;quot;);
			}
			m_CurrentState = GUILayout.Button (&amp;quot;Settings&amp;quot;) ? MenuState.Settings : m_CurrentState;
			m_CurrentState = GUILayout.Button (&amp;quot;Credits&amp;quot;) ? MenuState.Credits : m_CurrentState;
			GUILayout.FlexibleSpace ();
		EndStandardMenu ();
	}&lt;/p&gt;
&lt;p&gt;void OnSettingsGUI ()
	{
		BeginStandardMenu (&amp;quot;Settings&amp;quot;);
			m_Settings.m_ThisSetting = GUILayout.Toggle (m_Settings.m_ThisSetting, &amp;quot;This setting&amp;quot;);
			m_Settings.m_ThatSetting = GUILayout.Toggle (m_Settings.m_ThatSetting, &amp;quot;That setting&amp;quot;);
			m_Settings.m_TheOtherSetting = GUILayout.Toggle (m_Settings.m_TheOtherSetting, &amp;quot;The other setting&amp;quot;, &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.skin.GetStyle (&amp;quot;Button&amp;quot;));
			GUILayout.FlexibleSpace ();
			m_CurrentState = GUILayout.Button (&amp;quot;Main menu&amp;quot;) ? MenuState.Main : m_CurrentState;
		EndStandardMenu ();
	}&lt;/p&gt;
&lt;p&gt;void OnCreditsGUI ()
	{
		BeginStandardMenu (&amp;quot;Credits&amp;quot;);
			GUILayout.Label (&amp;quot;This game was created by some of the most awesomestest people on the planet. Having failed in their mission to Pluto, they started making games, which &amp;#8211; as you can see &amp;#8211; resulted in much joy and success!&amp;quot;);
				GUILayout.Space (20.0f);
				GUILayout.BeginHorizontal ();
					GUILayout.FlexibleSpace ();
						GUILayout.Label (&amp;quot;The awesomestest people inc.&amp;quot;);
				GUILayout.EndHorizontal ();&lt;/p&gt;
&lt;p&gt;GUILayout.FlexibleSpace ();
			m_CurrentState = GUILayout.Button (&amp;quot;Main menu&amp;quot;) ? MenuState.Main : m_CurrentState;
		EndStandardMenu ();
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Example project: &lt;a href=&quot;http://eej.dk/angryant/wp-content/uploads/2010/03/Menu.zip&quot;&gt;Menu.zip&lt;/a&gt; &amp;#8211; built with Unity 2.6.1&lt;/p&gt;</description>
				<published>2010-03-15 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/03/15/building-a-menu-of-delegates-and-enums/</link>
			</item>
			
		
			
			<item>
				<title>Pick me! Pick me!</title>
				<description>&lt;p&gt;Say you&amp;#8217;re developing an &lt;span class=&quot;caps&quot;&gt;RTS&lt;/span&gt; or maybe a connect-the-dots sort of game. What would be the easiest way to go about handling object selection? This is my suggested solution.&lt;/p&gt;
&lt;p&gt;In the given example, I&amp;#8217;m taking advantage of the object-mouse event handling that MonoBehaviours on GameObject with colliders on them give for free. You might be in a scenario where raycasting or otherwise resolving selection requests makes more sense, but the basic logic still applies. This example is merely intended to get your from start to goal as fast as possible.&lt;/p&gt;
&lt;p&gt;First off, we need a selection manager class (cleverly named SelectionManager in my example). This is where we store selection state and via static accessors, we can get and modify the current selection. Seeing as this class is both public and all accessors are static, you can put its source anywhere. In my example I&amp;#8217;ve simply put it right after the MonoBehaviour used for testing it.&lt;/p&gt;
&lt;p&gt;SelectionManager
&lt;script src='https://gist.github.com/3804386.js?file=SelectionManager.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;&lt;/p&gt;
&lt;p&gt;public class SelectionManager
{
	private static GameObject s_ActiveSelection;&lt;/p&gt;
&lt;p&gt;public static GameObject ActiveSelection
	{
		get
		{
			return s_ActiveSelection;
		}
		set
		{
			s_ActiveSelection = value;
		}
	}&lt;/p&gt;
&lt;p&gt;public static void Select (GameObject gameObject, bool selectionValue)
	{
		if (selectionValue)
		{
			Select (gameObject);
		}
		else
		{
			Deselect (gameObject);
		}
	}&lt;/p&gt;
&lt;p&gt;public static void Select (GameObject gameObject)
	{
		ActiveSelection = gameObject;
	}&lt;/p&gt;
&lt;p&gt;public static void Deselect (GameObject gameObject)
	{
		if (ActiveSelection == gameObject)
		{
			ActiveSelection = null;
		}
	}&lt;/p&gt;
&lt;p&gt;public static bool IsSelected (GameObject gameObject)
	{
		return ActiveSelection == gameObject;
	}
}
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And the promised MonoBehaviour using the SelectionManager class:
&lt;script src='https://gist.github.com/3804386.js?file=SelectableObject.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;&lt;/p&gt;
&lt;p&gt;public class SelectableObject : MonoBehaviour
{
	public Rect m_SelectionWindowRect = new Rect (10.0f, 10.0f, 300.0f, 100.0f);&lt;/p&gt;
&lt;p&gt;public void OnMouseDown ()
	{
		SelectionManager.Select (gameObject, !SelectionManager.IsSelected (gameObject));
	}&lt;/p&gt;
&lt;p&gt;public void OnDisable ()
	{
		SelectionManager.Deselect (gameObject);
	}&lt;/p&gt;
&lt;p&gt;public void Update ()
	{
		renderer.material.color = SelectionManager.IsSelected (gameObject) ? Color.green : Color.white;
	}&lt;/p&gt;
&lt;p&gt;public void OnGUI ()
	{
		if (SelectionManager.IsSelected (gameObject))
		{
			m_SelectionWindowRect = &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.Window (GetInstanceID (), m_SelectionWindowRect, SelectionWindow, gameObject.name);
		}
	}&lt;/p&gt;
&lt;p&gt;void SelectionWindow (int id)
	{
		GUILayout.Box (&amp;quot;I am the selection and my name is &amp;quot; + gameObject.name);
		&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.DragWindow ();
	}
}
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And that is all there is to it. By popular demand, I&amp;#8217;m now starting to provide pre-built projects with these tips and tricks posts. Download, unzip, open and play. Requires Unity 2.6.1:
&lt;a href='http://eej.dk/angryant/wp-content/uploads/2010/03/SelectableObject.zip'&gt;SelectableObject&lt;/a&gt;&lt;/p&gt;</description>
				<published>2010-03-10 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/03/10/pick-me-pick-me/</link>
			</item>
			
		
			
			<item>
				<title>Optimising coroutine yielding in C#</title>
				<description>&lt;p&gt;When needing to yield a coroutine for a single frame in C#, most people &amp;#8211; including myself usually go about it this way:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804418.js?file=Zero.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;private IEnumerator DoFadeAlphaIn ()
{
	while (m_Alpha &amp;amp;lt; 1.0f)
	{
		m_Alpha += Time.deltaTime;
		yield return 0;
	}
	m_Alpha = 1.0f;
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;However, as Rodrigo recently brought to my attention, this approach ofcourse performs unneeded memory allocation, given that the zero needs boxing and unboxing before its passed to the coroutine system. Using null in stead saves you that work and allocation.&lt;/p&gt;
&lt;p&gt;This might not seem like a lot at first glance, but if you make this a habit every time you need to yield for a frame, I guarantee you that you&amp;#8217;ll see results in larger scenarios.&lt;/p&gt;
&lt;p&gt;The more optimal way of yielding for a single frame in C#. Minor difference, but allocation saved &amp;#8211; which is always awesome:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804418.js?file=Null.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;private IEnumerator DoFadeAlphaIn ()
{
	while (m_Alpha &amp;amp;lt; 1.0f)
	{
		m_Alpha += Time.deltaTime;
		yield return null;
	}
	m_Alpha = 1.0f;
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;An interesting test could be to, on a larger co-routine heavy project, do a project-wide find and replace on &amp;#8220;yield return 0;&amp;#8221; and &amp;#8220;yield return null;&amp;#8221; back and forth and measuring the performance difference with the profiler (for non-pro users, maybe the performance gain is even measurable using external monitoring tools).&lt;/p&gt;</description>
				<published>2010-01-14 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/01/14/optimising-coroutine-yielding-in-c/</link>
			</item>
			
		
			
			<item>
				<title>Downloading the hydra</title>
				<description>&lt;p&gt;So I&amp;#8217;ve seen some people asking how you would go about downloading executable code from an external location, reading it into memory and executing it in ones running application.&lt;/p&gt;
&lt;p&gt;Now some readers might go &amp;#8220;eh? why the heck would someone want to do that?&amp;#8221;. Well first off, &lt;b&gt;its cool&lt;/b&gt;&amp;#8482;, but seeing as that is rarely an argument which convinces decision makers, here&amp;#8217;s a few others:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Patching. The ability to modify the behaviour of your downloaded executable after distribution, without requiring re-download.&lt;/li&gt;
	&lt;li&gt;Highly dynamic online content. Say you&amp;#8217;re building a virtual world or something. You might want to have the ability to add more complex behaviours to downloaded content &amp;#8211; more than what a data-driven approach allows for.&lt;/li&gt;
	&lt;li&gt;Or how about expanding the capabilities of user generated content?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There. Those are my alibis and I&amp;#8217;m sticking to them.&lt;/p&gt;
&lt;p&gt;Now this example is quick and simple so as to not bloat the post too much. Regardless of your use, you&amp;#8217;ll likely be wanting to add in for instance some cache functionality for real-world use.&lt;/p&gt;
&lt;p&gt;Right. So this example contains three pieces of eight, uh, code:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The loader utility &amp;#8211; responsible for downloading and making available the remote code.&lt;/li&gt;
	&lt;li&gt;The assembly &amp;#8211; you know, the one we&amp;#8217;re downloading.&lt;/li&gt;
	&lt;li&gt;An example handler. For easy re-use, I&amp;#8217;ve designed this example to allow for easy re-use of the loader utility by externalising handling of the assemblies via messages. This example handler shows some techniques for accessing the data of loaded assemblies.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the example:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Download and save /Assets/WWWAssemblyLoader.cs, /Assets/NewBehaviourScript.cs and /MyAssembly.cs.&lt;/li&gt;
	&lt;li&gt;Download and install the mono runtime (or the .net equivalent on Windnows &amp;#8211; not tested, but should work just fine).&lt;/li&gt;
	&lt;li&gt;Build the assembly from the terminal &amp;#8211; using the build command supplied at the end of this post.&lt;/li&gt;
	&lt;li&gt;Upload the assembly to some host (save the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; for later).&lt;/li&gt;
	&lt;li&gt;Open up your Unity project.&lt;/li&gt;
	&lt;li&gt;Add the WWWAssemblyLoader and NewBehaviourScript scripts to a GameObject and set the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; property of the first to that of your uploaded assembly.&lt;/li&gt;
	&lt;li&gt;Press play.&lt;/li&gt;
	&lt;li&gt;Profit!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And now the codes!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;/Assets/WWWAssemblyLoader.cs&lt;/b&gt;
&lt;script src='https://gist.github.com/3806151.js?file=WWWAssemblyLoader.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;
using System.Reflection;&lt;/p&gt;
&lt;p&gt;public class WWWAssemblyLoader : MonoBehaviour
{
	public string m_AssemblyURL;
	private string m_ErrorString = &amp;quot;&amp;quot;;
	private &lt;span class=&quot;caps&quot;&gt;WWW&lt;/span&gt; m_WWW;
	private bool m_Complete = true;&lt;/p&gt;
&lt;p&gt;public void Start ()
	{
		if (m_AssemblyURL != &amp;quot;&amp;quot;)
		{
			ReloadAssembly (m_AssemblyURL);
		}
	}&lt;/p&gt;
&lt;p&gt;public string AssemblyURL
	{
		get
		{
			return m_AssemblyURL;
		}
		set
		{
			if (m_AssemblyURL != value)
			{
				ReloadAssembly (value);
			}
		}
	}&lt;/p&gt;
&lt;p&gt;public float Progress
	{
		get
		{
			return m_Complete ? 1.0f : m_WWW.progress;
		}
	}&lt;/p&gt;
&lt;p&gt;public string Error
	{
		get
		{
			return m_ErrorString;
		}
	}&lt;/p&gt;
&lt;p&gt;public void ReloadAssembly (string url)
	{
		m_Complete = false;
		m_ErrorString = &amp;quot;&amp;quot;;
		m_AssemblyURL = url;
		m_WWW = new &lt;span class=&quot;caps&quot;&gt;WWW&lt;/span&gt; (m_AssemblyURL);
	}&lt;/p&gt;
&lt;p&gt;public void Update ()
	{
		if (!m_Complete)
		{
			if (m_WWW.error != null)
			{
				m_ErrorString = m_WWW.error;
				m_Complete = true;
				SendMessage (&amp;quot;OnAssemblyLoadFailed&amp;quot;, m_AssemblyURL);
			}
			else if (m_WWW.isDone)
			{
				Assembly assembly = LoadAssembly ();
				m_Complete = true;
				if (assembly != null)
				{
					Debug.Log (&amp;quot;Done&amp;quot;);
					SendMessage (&amp;quot;OnAssemblyLoaded&amp;quot;, new WWWAssembly (m_AssemblyURL, assembly));
				}
				else
				{
					Debug.Log (&amp;quot;Failed&amp;quot;);
					SendMessage (&amp;quot;OnAssemblyLoadFailed&amp;quot;, m_AssemblyURL);
				}
			}
		}
	}&lt;/p&gt;
&lt;p&gt;private Assembly LoadAssembly ()
	{
		try
		{
			return Assembly.Load (m_WWW.bytes);
		}
		catch (System.Exception e)
		{
			m_ErrorString = e.ToString ();
			return null;
		}
	}
}&lt;/p&gt;
&lt;p&gt;public class WWWAssembly
{
	private string m_URL;
	private Assembly m_Assembly;&lt;/p&gt;
&lt;p&gt;public string &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;
	{
		get
		{
			return m_URL;
		}
	}&lt;/p&gt;
&lt;p&gt;public Assembly Assembly
	{
		get
		{
			return m_Assembly;
		}
	}&lt;/p&gt;
&lt;p&gt;public WWWAssembly (string url, Assembly assembly)
	{
		m_URL = url;
		m_Assembly = assembly;
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;/Assets/NewBehaviourScript.cs&lt;/b&gt;
&lt;script src='https://gist.github.com/3806151.js?file=NewBehaviourScript.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;
using System.Reflection;&lt;/p&gt;
&lt;p&gt;public class NewBehaviourScript : MonoBehaviour
{
	private string m_MessageString = &amp;quot;Waiting for assembly&amp;quot;;&lt;/p&gt;
&lt;p&gt;void OnAssemblyLoaded (WWWAssembly loadedAssembly)
	{
		m_MessageString = &amp;quot;Assembly &amp;quot; + loadedAssembly.&lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; + &amp;quot;\n&amp;quot;;&lt;/p&gt;
&lt;p&gt;System.Type type = loadedAssembly.Assembly.GetType (&amp;quot;MyClass&amp;quot;);&lt;/p&gt;
&lt;p&gt;FieldInfo field = type.GetField (&amp;quot;myString&amp;quot;);
		m_MessageString += (field.GetValue (null) as string) + &amp;quot;\n&amp;quot;;&lt;/p&gt;
&lt;p&gt;object instance = loadedAssembly.Assembly.CreateInstance (&amp;quot;MyClass&amp;quot;);
		MethodInfo method = type.GetMethod (&amp;quot;LogMyString&amp;quot;);
		m_MessageString += &amp;quot;Return value: &amp;quot; + method.Invoke (instance, null).ToString ();
	}&lt;/p&gt;
&lt;p&gt;void OnAssemblyLoadFailed (string url)
	{
		m_MessageString = &amp;quot;Failed to load assembly at &amp;quot; + url;
	}&lt;/p&gt;
&lt;p&gt;void OnGUI ()
	{
		GUILayout.BeginArea (new Rect (0.0f, 0.0f, Screen.width, Screen.height));
			GUILayout.FlexibleSpace ();
			GUILayout.BeginHorizontal ();
				GUILayout.FlexibleSpace ();
				GUILayout.Box (m_MessageString);
				GUILayout.FlexibleSpace ();
			GUILayout.EndHorizontal ();
			GUILayout.FlexibleSpace ();
		GUILayout.EndArea ();
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;/MyAssembly.cs&lt;/b&gt;
&lt;script src='https://gist.github.com/3806151.js?file=MyAssembly.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;&lt;/p&gt;
&lt;p&gt;public class MyClass
{
	public static string myString = &amp;quot;This is my string from my class in my assembly&amp;quot;;&lt;/p&gt;
&lt;p&gt;public int LogMyString ()
	{
		Debug.Log (myString);
		return 2 + 2;
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The assembly compile terminal command&lt;/b&gt;
&lt;script src='https://gist.github.com/3806151.js?file=Build.sh'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;mcs -target:library -out:MyAssembly.dll -r:/Applications/Unity/Unity.app/Contents/Frameworks/UnityEngine.dll  MyAssembly.cs&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;</description>
				<published>2010-01-05 00:00:00 +0100</published>
				<link>http://www.angryant.com/2010/01/05/downloading-the-hydra/</link>
			</item>
			
		
			
			<item>
				<title>New license of Path: GPL</title>
				<description>&lt;p&gt;Since I started at Unity, I haven&amp;#8217;t really had the time to do much updating (read: none) of my private projects. In sheer size, Path is the largest of those, so a while ago I realised that maintaining that project is simply not feasible.&lt;/p&gt;
&lt;p&gt;By adding the &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt; license option to the existing two license options (the show-my-logo license displayed on &lt;a href=&quot;/path/downloads/&quot;&gt;download from angryant.com&lt;/a&gt; and the option for a custom negotiated one), users are able to test and modify the source of Path directly &amp;#8211; before deciding on one of the other licenses.&lt;/p&gt;
&lt;p&gt;Also, although very messy (yes &amp;#8211; very), the source could also serve as a good learning resource for Unity editor scripting.&lt;/p&gt;
&lt;p&gt;The project repository is available on &lt;a href=&quot;http://github.com/AngryAnt/Path-GPL&quot;&gt;github&lt;/a&gt; .&lt;/p&gt;</description>
				<published>2009-11-15 00:00:00 +0100</published>
				<link>http://www.angryant.com/2009/11/15/new-license-of-path-gpl/</link>
			</item>
			
		
			
			<item>
				<title>CopyInspector</title>
				<description>&lt;p&gt;Yea I know. It&amp;#8217;s been a while. I do have two very good excuses though: 2.6 and Unite &amp;#8216;09. If you enjoyed those then zip it and read on. If not, I&amp;#8217;m really out of ammo and sorry for the delay.&lt;/p&gt;
&lt;p&gt;At Unite, I attended the talk by John Grden of infrared5 on the special (free) Unity for flash users day. During this session he complained about wanting to be able to copy his runtime transform changes inside the &lt;span class=&quot;caps&quot;&gt;IDE&lt;/span&gt; (he was copying by way of paper notes it seemed). I decided to take up the challenge when he continued with &amp;#8220;&amp;#8230; but someone is probably going to show me how to do that after this&amp;#8221; and after his talk I handed him a custom inspector editor script for solving that specific problem.&lt;/p&gt;
&lt;p&gt;Later at the conference I had some time to kill and did a rewrite to expand the script to be general for any component type. I didn&amp;#8217;t have the time to hand John that version, but I suppose I&amp;#8217;ll just email him a link to this post.&lt;/p&gt;
&lt;p&gt;So anyway &amp;#8211; lets talk implementation:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Add CopyInspector.cs to Assets/Editor.&lt;/li&gt;
	&lt;li&gt;Add CopyTransformInspector.cs to Assets/Editor.&lt;/li&gt;
	&lt;li&gt;For each other component to be made copy/paste-able:
	&lt;ul&gt;
		&lt;li&gt;Add CopyYourComponentTypeInspector.cs to Assets/Editor.&lt;/li&gt;
		&lt;li&gt;Rename it appropriately.&lt;/li&gt;
		&lt;li&gt;Rename the class to match the file name.&lt;/li&gt;
		&lt;li&gt;Change YourComponentType in &amp;#8220;[CustomEditor (typeof (YourComponentType))]&amp;#8221; to the type of component you wish to affect.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;http://eej.dk/angryant/wp-content/uploads/2009/11/CopyTransformInspector.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#8217;ll notice that CopyTransformInspector has some additional code to it. This is due to the fact that this inspector is rendered non-standard and the code provided just replicates that.&lt;/p&gt;
&lt;p&gt;Not really sure why syntax highlighting is not kicking in&amp;#8230; Will have a look at that later.&lt;/p&gt;
&lt;p&gt;Codes!&lt;/p&gt;
&lt;p&gt;CopyInspector.cs
&lt;script src='https://gist.github.com/3806123.js?file=CopyInspector.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;&lt;/p&gt;
&lt;p&gt;public class CopyInspector : Editor
{
	static System.Type m_OriginalType;
	static Dictionary object&amp;gt; m_Values;&lt;/p&gt;
&lt;p&gt;private List  GetProperties (Component component)
	{
		List &amp;lt;string&amp;gt; ignoredProperties;
		List  properties;&lt;/p&gt;
&lt;p&gt;properties = new List  ();
		ignoredProperties = new List &amp;lt;string&amp;gt; ();
		foreach (PropertyInfo propertyInfo in typeof (Component).GetProperties ())
		{
			ignoredProperties.Add (propertyInfo.Name);
		}&lt;/p&gt;
&lt;p&gt;foreach (PropertyInfo propertyInfo in component.GetType ().GetProperties ())
		{
			if (ignoredProperties.Contains (propertyInfo.Name))
			{
				continue;
			}
			properties.Add (propertyInfo);
		}&lt;/p&gt;
&lt;p&gt;return properties;
	}&lt;/p&gt;
&lt;p&gt;public override void OnInspectorGUI ()
	{
		DrawDefaultInspector ();
		OnCopyInspectorGUI ();
	}&lt;/p&gt;
&lt;p&gt;public void OnCopyInspectorGUI ()
	{
		bool enabled;
		List  properties;
		Component component;&lt;/p&gt;
&lt;p&gt;component = target as Component;&lt;/p&gt;
&lt;p&gt;if (component == null)
		{
			return;
		}&lt;/p&gt;
&lt;p&gt;GUILayout.Space (10.0f);&lt;/p&gt;
&lt;p&gt;Color backgroundColor = &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.backgroundColor;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.backgroundColor = new Color (0.8f, 0.8f, 0.8f);&lt;/p&gt;
&lt;p&gt;GUILayout.BeginVertical (&amp;quot;Toolbar&amp;quot;);&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.backgroundColor = backgroundColor;&lt;/p&gt;
&lt;p&gt;GUILayout.BeginHorizontal ();&lt;/p&gt;
&lt;p&gt;GUILayout.Space (10.0f);&lt;/p&gt;
&lt;p&gt;GUILayout.Label (&amp;quot;Copied: &amp;quot; + (m_OriginalType != null ? m_OriginalType.Name : &amp;quot;Nothing&amp;quot;), &amp;quot;MiniLabel&amp;quot;);&lt;/p&gt;
&lt;p&gt;GUILayout.FlexibleSpace ();&lt;/p&gt;
&lt;p&gt;if (GUILayout.Button (new GUIContent (&amp;quot;Copy&amp;quot;, &amp;quot;Copy component values&amp;quot;), &amp;quot;MiniLabel&amp;quot;))
				{
					m_OriginalType = target.GetType ();&lt;/p&gt;
&lt;p&gt;properties = GetProperties (component);&lt;/p&gt;
&lt;p&gt;m_Values = new Dictionary object&amp;gt; ();
					foreach (PropertyInfo property in properties)
					{
						m_Values [property] = property.GetValue (component, null);
					}
				}&lt;/p&gt;
&lt;p&gt;enabled = &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.enabled;
				&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.enabled = target.GetType () == m_OriginalType;&lt;/p&gt;
&lt;p&gt;GUILayout.Space (10.0f);&lt;/p&gt;
&lt;p&gt;if (GUILayout.Button (new GUIContent (&amp;quot;Paste&amp;quot;, &amp;quot;Paste component values&amp;quot;), &amp;quot;MiniLabel&amp;quot;))
				{
					properties = GetProperties (component);
					foreach (PropertyInfo property in properties)
					{
						if (!property.CanWrite)
						{
							continue;
						}&lt;/p&gt;
&lt;p&gt;property.SetValue (component, m_Values [property], null);
					}
				}&lt;/p&gt;
&lt;p&gt;GUILayout.Space (10.0f);&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.enabled = enabled;&lt;/p&gt;
&lt;p&gt;GUILayout.EndHorizontal ();&lt;/p&gt;
&lt;p&gt;GUILayout.EndVertical ();&lt;/p&gt;
&lt;p&gt;GUILayout.Space (-2.0f);
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;CopyTransformInspector.cs
&lt;script src='https://gist.github.com/3806123.js?file=CopyTransformInspector.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using UnityEditor;
using System.Collections;&lt;/p&gt;
&lt;p&gt;[CustomEditor (typeof (Transform))]
public class CopyTransformInspector : CopyInspector
{
	public override void OnInspectorGUI ()
	{
		Transform transform;
		Vector3 localPosition, localScale;
		Quaternion localRotation;&lt;/p&gt;
&lt;p&gt;transform = target as Transform;&lt;/p&gt;
&lt;p&gt;localPosition = EditorGUILayout.Vector3Field (&amp;quot;Position&amp;quot;, transform.localPosition);
		localRotation = Quaternion.Euler (EditorGUILayout.Vector3Field (&amp;quot;Rotation&amp;quot;, transform.localRotation.eulerAngles));
		localScale = EditorGUILayout.Vector3Field (&amp;quot;Scale&amp;quot;, transform.localScale);&lt;/p&gt;
&lt;p&gt;if (&lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.changed)
		{
			transform.localPosition = localPosition;
			transform.localRotation = localRotation;
			transform.localScale = localScale;
		}&lt;/p&gt;
&lt;p&gt;OnCopyInspectorGUI ();
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;CopyYourComponentTypeInspector.cs
&lt;script src='https://gist.github.com/3806123.js?file=CopyYourComponentTypeInspector.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using UnityEditor;
using System.Collections;&lt;/p&gt;
&lt;p&gt;[CustomEditor (typeof (YourComponentType))]
public class CopyYourComponentTypeInspector : CopyInspector{}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;</description>
				<published>2009-11-04 00:00:00 +0100</published>
				<link>http://www.angryant.com/2009/11/04/copyinspector/</link>
			</item>
			
		
			
			<item>
				<title>Magnetic</title>
				<description>&lt;p&gt;You know how Little Big Planet, Kingdom Hearts and similar have various pickups move towards your character when you get up close? Yea I also find that&amp;#8217;s a nice bit of polish.&lt;/p&gt;
&lt;p&gt;One way of getting that up and running in Unity is via the code below. Setup:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Add all objects you want to get attracted to the player to a special layer.&lt;/li&gt;
	&lt;li&gt;Attach the script below to your player.&lt;/li&gt;
	&lt;li&gt;Set the layer mask on the component to include the layer from step one.&lt;/li&gt;
	&lt;li&gt;Tweak, play, repeat.&lt;/li&gt;
&lt;/ol&gt;
&lt;script src='https://gist.github.com/3804429.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;

public class Magnetic : MonoBehaviour
{
	public LayerMask m_MagneticLayers;
	public Vector3 m_Position;
	public float m_Radius;
	public float m_Force;

	void FixedUpdate ()
	{
		Collider[] colliders;
		Rigidbody rigidbody;

		colliders = Physics.OverlapSphere (transform.position + m_Position, m_Radius, m_MagneticLayers);
		foreach (Collider collider in colliders)
		{
			rigidbody = (Rigidbody) collider.gameObject.GetComponent (typeof (Rigidbody));
			if (rigidbody == null)
			{
				continue;
			}
			rigidbody.AddExplosionForce (m_Force * -1, transform.position + m_Position, m_Radius);
		}
	}

	void OnDrawGizmosSelected ()
	{
		Gizmos.color = Color.red;
		Gizmos.DrawWireSphere (transform.position + m_Position, m_Radius);
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;</description>
				<published>2009-10-04 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/10/04/magnetic/</link>
			</item>
			
		
			
			<item>
				<title>GUI drag-drop</title>
				<description>&lt;p&gt;A lot of people have been asking for tips on how to implement drag-drop functionality in Unity &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; scripting, so I decided to put together a reusable script for the purpose.&lt;/p&gt;
&lt;p&gt;Basically the solution requires that your data class derives from GUIDraggableObject and at some point in its OnGUI method call Drag( Rect ) &amp;#8211; just like &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.Window handles dragging.&lt;/p&gt;
&lt;p&gt;Right. Codez. First off the GUIDraggableObject.cs file:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804740.js?file=GUIDraggableObject.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;

public class GUIDraggableObject
{
	protected Vector2 m_Position;
	private Vector2 m_DragStart;
	private bool m_Dragging;

	public GUIDraggableObject (Vector2 position)
	{
		m_Position = position;
	}

	public bool Dragging
	{
		get
		{
			return m_Dragging;
		}
	}

	public Vector2 Position
	{
		get
		{
			return m_Position;
		}

		set
		{
			m_Position = value;
		}
	}

	public void Drag (Rect draggingRect)
	{
		if (Event.current.type == EventType.MouseUp)
		{
			m_Dragging = false;
		}
		else if (Event.current.type == EventType.MouseDown &amp;amp;amp;&amp;amp;amp; draggingRect.Contains (Event.current.mousePosition))
		{
			m_Dragging = true;
			m_DragStart = Event.current.mousePosition - m_Position;
			Event.current.Use();
		}

		if (m_Dragging)
		{
			m_Position = Event.current.mousePosition - m_DragStart;
		}
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;An example data class inheriting from GUIDraggableObject &amp;#8211; DataObject.cs:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804740.js?file=DataObject.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;

public class DataObject : GUIDraggableObject
// This class just has the capability of being dragged in GUI - it could be any type of generic data class
{
	private string m_Name;
	private int m_Value;

	public DataObject (string name, int value, Vector2 position) : base (position)
	{
		m_Name = name;
		m_Value = value;
	}

	public void OnGUI ()
	{
		Rect drawRect = new Rect (m_Position.x, m_Position.y, 100.0f, 100.0f), dragRect;

		GUILayout.BeginArea (drawRect, GUI.skin.GetStyle (&amp;amp;quot;Box&amp;amp;quot;));
			GUILayout.Label (m_Name, GUI.skin.GetStyle (&amp;amp;quot;Box&amp;amp;quot;), GUILayout.ExpandWidth (true));

			dragRect = GUILayoutUtility.GetLastRect ();
			dragRect = new Rect (dragRect.x + m_Position.x, dragRect.y + m_Position.y, dragRect.width, dragRect.height);

			if (Dragging)
			{
				GUILayout.Label (&amp;amp;quot;Wooo...&amp;amp;quot;);
			}
			else if (GUILayout.Button (&amp;amp;quot;Yes!&amp;amp;quot;))
			{
				Debug.Log (&amp;amp;quot;Yes. It is &amp;amp;quot; + m_Value + &amp;amp;quot;!&amp;amp;quot;);
			}
		GUILayout.EndArea ();

		Drag (dragRect);
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;And finally, this script demonstrates how you could have your data manager class use Unity &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; for data visualisation with drag-drop enabled &amp;#8211; MyMonoBehaviour.cs:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804740.js?file=MyMonoBehaviour.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class MyMonoBehaviour : MonoBehaviour
{
	private List&amp;amp;lt; DataObject &amp;amp;gt; m_Data = new List&amp;amp;lt; DataObject &amp;amp;gt; ();
	private Rect dropTargetRect = new Rect (10.0f, 10.0f, 30.0f, 30.0f);

	void Awake ()
	{
		m_Data.Add (new DataObject (&amp;amp;quot;One&amp;amp;quot;, 1, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Two&amp;amp;quot;, 2, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Three&amp;amp;quot;, 3, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Four&amp;amp;quot;, 4, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Five&amp;amp;quot;, 5, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
	}

	public void OnGUI ()
	{
		DataObject toFront, dropDead;
		Color color;

		GUI.Box(dropTargetRect, &amp;amp;quot;Die&amp;amp;quot;);

		toFront = dropDead = null;
		foreach (DataObject data in m_Data)
		{
			color = GUI.color;

			if (data.Dragging)
			{
				GUI.color = dropTargetRect.Contains (Event.current.mousePosition) ? Color.red : color;
			}

			data.OnGUI ();

			GUI.color = color;

			if (data.Dragging)
			{
				if (m_Data.IndexOf (data) != m_Data.Count - 1)
				{
					toFront = data;
				}
			}
		}

		if (toFront != null)
		// Move an object to front if needed
		{
			m_Data.Remove (toFront);
			m_Data.Add (toFront);
		}
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;
&lt;p&gt;Ah yea and an example of how you could do the same in an editor window &amp;#8211; MyEditorWindow.cs:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804740.js?file=MyEditorWindow.cs'&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;

public class MyEditorWindow : EditorWindow
{
	private List&amp;amp;lt; DataObject &amp;amp;gt; m_Data = new List&amp;amp;lt; DataObject &amp;amp;gt; ();
	private bool doRepaint = false;
	private Rect dropTargetRect = new Rect (10.0f, 10.0f, 30.0f, 30.0f);

	public MyEditorWindow ()
	{
		m_Data.Add (new DataObject (&amp;amp;quot;One&amp;amp;quot;, 1, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Two&amp;amp;quot;, 2, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Three&amp;amp;quot;, 3, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Four&amp;amp;quot;, 4, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
		m_Data.Add (new DataObject (&amp;amp;quot;Five&amp;amp;quot;, 5, new Vector2 (20.0f * Random.Range (1.0f, 10.0f), 20.0f * Random.Range (1.0f, 10.0f))));
	}

	[MenuItem (&amp;amp;quot;Window/MyEditorWindow&amp;amp;quot;)]
	public static void Launch ()
	{
		GetWindow (typeof (MyEditorWindow)).Show ();
	}

	public void Update ()
	{
		if (doRepaint)
		{
			Repaint ();
		}
	}

	public void OnGUI ()
	{
		DataObject toFront, dropDead;
		bool previousState, flipRepaint;
		Color color;

		GUI.Box(dropTargetRect, &amp;amp;quot;Die&amp;amp;quot;);

		toFront = dropDead = null;
		doRepaint = false;
		flipRepaint = false;
		foreach (DataObject data in m_Data)
		{
			previousState = data.Dragging;

			color = GUI.color;

			if (previousState)
			{
				GUI.color = dropTargetRect.Contains (Event.current.mousePosition) ? Color.red : color;
			}

			data.OnGUI ();

			GUI.color = color;

			if (data.Dragging)
			{
				doRepaint = true;

				if (m_Data.IndexOf (data) != m_Data.Count - 1)
				{
					toFront = data;
				}
			}
			else if (previousState)
			{
				flipRepaint = true;

				if (dropTargetRect.Contains (Event.current.mousePosition))
				{
					dropDead = data;
				}
			}
		}

		if (toFront != null)
		// Move an object to front if needed
		{
			m_Data.Remove (toFront);
			m_Data.Add (toFront);
		}

		if (dropDead != null)
		// Destroy an object if needed
		{
			m_Data.Remove (dropDead);
		}

		if (flipRepaint)
		// If some object just stopped being dragged, we should repaing for the state change
		{
			Repaint ();
		}
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;</description>
				<published>2009-09-18 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/09/18/gui-drag-drop/</link>
			</item>
			
		
			
			<item>
				<title>Logging an entire GameObject</title>
				<description>&lt;p&gt;More stuff from the shadowy corners of my hard-drive. Don&amp;#8217;t remember the context, but someone needed to log every single piece of information available on a particular GameObject. I suppose this could be useful for end-user &amp;#8220;This GameObject Just Went Completely &lt;span class=&quot;caps&quot;&gt;FUBAR&lt;/span&gt;&amp;#8221;&amp;#8482; scenarios.&lt;/p&gt;
&lt;p&gt;Anyway &amp;#8211; it has reflection in it which by definition makes it cool.&lt;/p&gt;
&lt;p&gt;Le codez:
&lt;script src='https://gist.github.com/3804730.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using System.Reflection;&lt;/p&gt;
&lt;p&gt;public class Utilities
{
	/* &amp;#8230; */&lt;/p&gt;
&lt;p&gt;static void LogGameObject( GameObject gameObject, bool children )
	{
		Component[] components = gameObject.GetComponents( typeof( Component ) );
		FieldInfo[] fields;
		PropertyInfo[] properties;&lt;/p&gt;
&lt;p&gt;Debug.Log( gameObject.name + &amp;quot;:&amp;quot; );&lt;/p&gt;
&lt;p&gt;foreach( Component component in components )
		{
			Debug.Log( &amp;quot; &amp;#8211; &amp;quot; + component.GetType().Name + &amp;quot;:&amp;quot; );
			fields = component.GetType().GetFields();
			foreach( FieldInfo field in fields )
			{
				Debug.Log( &amp;quot; .&amp;quot; + field.Name + &amp;quot; = &amp;quot; + field.GetValue( component ) );
			}&lt;/p&gt;
&lt;p&gt;properties = component.GetType().GetProperties();
			foreach( PropertyInfo property in properties )
			{
				Debug.Log( &amp;quot; .&amp;quot; + property.Name + &amp;quot; = &amp;quot; + property.GetGetMethod().Invoke( component, null ) );
			}
		}&lt;/p&gt;
&lt;p&gt;if( children )
		{
			foreach( Transform transform in gameObject.transform )
			{
				Debug.Log( &amp;quot;-&amp;gt;&amp;quot; );
				LogGameObject( transform.gameObject, children );
			}
		}
	}&lt;/p&gt;
&lt;p&gt;static void LogGameObject( GameObject gameObject )
	{
		LogGameObject( gameObject, false );
	}&lt;/p&gt;
&lt;p&gt;/* &amp;#8230; */
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;</description>
				<published>2009-09-17 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/09/17/logging-an-entire-gameobject/</link>
			</item>
			
		
			
			<item>
				<title>I bet you can't type an A!</title>
				<description>&lt;p&gt;Keys got special meaning and shouldn&amp;#8217;t be fed into parts of the &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;? This handy little snippet takes care of that job:&lt;/p&gt;
&lt;script src='https://gist.github.com/3804718.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;private string text = &amp;amp;quot;I bet you can&amp;amp;#39;t type an A!&amp;amp;quot;;



static void DisableKeys( KeyCode[] keys )
{
	if( !Event.current.isKey )
	{
		return;
	}

	foreach( KeyCode key in keys )
	{
		if( Event.current.keyCode == key )
		{
			Event.current.Use();
		}
	}
}



static void DisableKey( KeyCode key )
{
	DisableKeys( new KeyCode[]{ key } );
}



void OnGUI()
{
	DisableKey( KeyCode.A );
	text = GUILayout.TextArea( text );
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;</description>
				<published>2009-09-07 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/09/07/i-bet-you-cant-type-an-a/</link>
			</item>
			
		
			
			<item>
				<title>Where did that component go?</title>
				<description>&lt;p&gt;In larger Unity projects, components sometimes &amp;#8220;get lost&amp;#8221; &amp;#8211; you refactor something and there&amp;#8217;s an audio source still attached somewhere in your hierarchy and you simply cannot remember where.&lt;/p&gt;
&lt;p&gt;You&amp;#8217;re not the first one. A while ago I created a simple editor script to combat this issue as a response to a similar frustrated post on the Unity forums. Earlier this week I stumbled on the script again, picked it up and dusted it off a bit and decided to give it another chance to shine in some spotlight.&lt;/p&gt;
&lt;p&gt;Use:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Save the script as &lt;i&gt;ComponentLister.cs&lt;/i&gt;.&lt;/li&gt;
	&lt;li&gt;Place it in /Assets/Editor in your project.&lt;/li&gt;
	&lt;li&gt;Launch the window from the Component menu &amp;#8211; should be the last item titled &amp;#8220;Component lister&amp;#8221;.&lt;/li&gt;
	&lt;li&gt;Click &amp;#8220;Refresh&amp;#8221; to list all components in your scene and the GameObjects to which they are attached.&lt;/li&gt;
	&lt;li&gt;To investigate, click a GameObject name in the list and it will be set as the active selection in the hierarchy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Codes:
&lt;script src='https://gist.github.com/3804708.js?file='&gt;&lt;/script&gt;&lt;div&gt;&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;using UnityEngine;
using UnityEditor;
using System.Collections;&lt;/p&gt;
&lt;p&gt;public class ComponentLister : EditorWindow
{
	private Hashtable sets = new Hashtable();
	private Vector2 scrollPosition;&lt;/p&gt;
&lt;p&gt;[ MenuItem( &amp;quot;Component/Component lister&amp;quot; ) ]
	public static void Launch()
	{
		EditorWindow window = GetWindow( typeof( ComponentLister ) );
		window.Show();
	}&lt;/p&gt;
&lt;p&gt;public void UpdateList()
	{
		Object[] objects;&lt;/p&gt;
&lt;p&gt;sets.Clear();&lt;/p&gt;
&lt;p&gt;objects = FindObjectsOfType( typeof( Component ) );
		foreach( Component component in objects )
		{
			if( !sets.ContainsKey( component.GetType() ) )
			{
				sets[ component.GetType() ] = new ArrayList();
			}&lt;/p&gt;
&lt;p&gt;( ( ArrayList )sets[ component.GetType() ] ).Add( component.gameObject );
		}
	}&lt;/p&gt;
&lt;p&gt;public void OnGUI()
	{
		GUILayout.BeginHorizontal( &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;.skin.GetStyle( &amp;quot;Box&amp;quot; ) );
			GUILayout.Label( &amp;quot;Components in scene:&amp;quot; );
			GUILayout.FlexibleSpace();&lt;/p&gt;
&lt;p&gt;if( GUILayout.Button( &amp;quot;Refresh&amp;quot; ) )
			{
				UpdateList();
			}
		GUILayout.EndHorizontal();&lt;/p&gt;
&lt;p&gt;scrollPosition = GUILayout.BeginScrollView(scrollPosition);&lt;/p&gt;
&lt;p&gt;foreach( System.Type type in sets.Keys )
			{
				GUILayout.Label( type.Name + &amp;quot;:&amp;quot; );
				foreach( GameObject gameObject in ( ArrayList )sets[ type ] )
				{
					if( GUILayout.Button( gameObject.name ) )
					{
						Selection.activeObject = gameObject;
					}
				}
			}&lt;/p&gt;
&lt;p&gt;GUILayout.EndScrollView();
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;&lt;/p&gt;</description>
				<published>2009-08-31 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/08/31/where-did-that-component-go/</link>
			</item>
			
		
			
			<item>
				<title>UnitySteer</title>
				<description>&lt;p&gt;Ok so I&amp;#8217;ve been quite busy lately and so I haven&amp;#8217;t been updating the site as much as I should. In the beginning of July, UnitySteer was released. Ricardo Mendez of &lt;a href=&quot;http://arges-systems.com&quot;&gt;Arges Systems&lt;/a&gt; did the majority of the work and I did some early coding and design on the project.&lt;/p&gt;
&lt;p&gt;UnitySteer is a collection of steering behaviours &amp;#8211; enabling complex movement behaviour by combining the default behaviour set or creating new custom ones. The project is based on OpenSteerDotNet which is a .net port of OpenSteer. During the implementation of the Unity interface, however, a lot of the existing code base was either rewritten or discarded completely, so code based on the previous OpenSteer versions is not directly compatible.&lt;/p&gt;
&lt;p&gt;For more information, check out &lt;a href=&quot;http://www.arges-systems.com/articles/35/unitysteer-steering-components-for-unity&quot;&gt;Ricardo&amp;#8217;s blog post&lt;/a&gt; and the &lt;a href=&quot;http://github.com/ricardojmendez/UnitySteer/tree/master&quot;&gt;library&lt;/a&gt; and &lt;a href=&quot;http://github.com/ricardojmendez/UnitySteerExamples/tree/master&quot;&gt;examples&lt;/a&gt; repositories.&lt;/p&gt;
&lt;p&gt;UnitySteer is open source, released under the &lt;a href=&quot;http://www.opensource.org/licenses/mit-license.php&quot;&gt;&lt;span class=&quot;caps&quot;&gt;MIT&lt;/span&gt; license&lt;/a&gt; .&lt;/p&gt;</description>
				<published>2009-08-19 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/08/19/unitysteer/</link>
			</item>
			
		
			
			<item>
				<title>New and improved: Behave 1.0 released</title>
				<description>&lt;p&gt;After lots of late night tinkering, Behave 1.0 is finally out. This version fixes all known issues with unity 2.5, brings in lessons learned from Path 1.0 meaning a smashing new interface plus lots of new additions.&lt;/p&gt;
&lt;p&gt;The new tree editor contains interface improvements allowing for much faster tree building: A brand new component bar, sub-tree movement, integration with the standard unity inspector and more.&lt;/p&gt;
&lt;p&gt;In this version, the Behave runtime have also received an update. More runtime data is more easily available from the tree and library classes and methods implemented in your agent scripts are now mapped directly (by name) to action and decorator invokes.&lt;/p&gt;
&lt;p&gt;This site will be updated as soon as possible with all the changes and additions and the documentation will be brought up to speed.&lt;/p&gt;
&lt;p&gt;So what are you waiting for? Head on over to the downloads section and get your copy today!&lt;/p&gt;</description>
				<published>2009-05-18 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/05/18/new-and-improved-behave-10-released/</link>
			</item>
			
		
			
			<item>
				<title>Behave 0.3b and unity 2.5</title>
				<description>&lt;p&gt;Apart from the hotfix, the following steps need to be followed when using Behave 0.3b in unity 2.5:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;When building an asset, make sure to use the shortcut for it and not the menu.&lt;/li&gt;
	&lt;li&gt;Behave.dll needs to be in a subfolder of your Assets folder named &amp;#8220;Assets&amp;#8221;. That is, for instance, &amp;#8220;MyProject/Assets/Assets/Behave.dll&amp;#8221;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;m currently working on a new version of Behave which will resolve these and other issues apart from adding new features.&lt;/p&gt;</description>
				<published>2009-04-08 00:00:00 +0200</published>
				<link>http://www.angryant.com/2009/04/08/behave-03b-and-unity-25/</link>
			</item>
			
		
			
			<item>
				<title>Behave 0.3b hotfix</title>
				<description>&lt;p&gt;Changes in the unity 2.5 editor &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; has resulted in some bad issues in Behave 0.3b &amp;#8211; a hotfix to solve the most critical ones &amp;#8211; making the Behave editor interface usable again is available in the Behave downloads section.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll be working on a more extensive rewrite. Stay tuned.&lt;/p&gt;</description>
				<published>2009-03-20 00:00:00 +0100</published>
				<link>http://www.angryant.com/2009/03/20/behave-03b-hotfix/</link>
			</item>
			
		
			
			<item>
				<title>Path tutorial video available</title>
				<description>&lt;p&gt;I just finished the first Path tutorial video. &lt;a href=&quot;/resources/path/TheBasics.mov&quot;&gt;Give it a look&lt;/a&gt;.&lt;/p&gt;</description>
				<published>2009-03-19 00:00:00 +0100</published>
				<link>http://www.angryant.com/2009/03/19/path-tutorial-video-available/</link>
			</item>
			
		
			
			<item>
				<title>Path 1.0 launched!</title>
				<description>&lt;p&gt;Earlier today unity 2.5 launched so here we go! Path 1.0 and a pretty new website is now online. Victory!&lt;/p&gt;</description>
				<published>2009-03-18 00:00:00 +0100</published>
				<link>http://www.angryant.com/2009/03/18/path-10-launched/</link>
			</item>
			
		
			
			<item>
				<title>Continued community tutorials</title>
				<description>&lt;p&gt;Arges from the unity community has been keeping busy. His latest tutorial goes more in-depth with Behave and unity, providing an interesting and useful example to work with.&lt;/p&gt;
&lt;p&gt;Have a read at &lt;a href=&quot;http://www.arges-systems.com/articles/14/behavior-trees-branching-paths-with-selectors&quot;&gt;http://www.arges-systems.com/articles/14/behavior-trees-branching-paths-with-selectors&lt;/a&gt; .&lt;/p&gt;</description>
				<published>2008-12-17 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/12/17/community-tutorial-2/</link>
			</item>
			
		
			
			<item>
				<title>Community tutorial</title>
				<description>&lt;p&gt;Arges from the unity community just made a tutorial on Behave available. Check it out at &lt;a href=&quot;http://www.arges-systems.com/articles/2/behavior-trees-in-unity-with-behave&quot;&gt;http://www.arges-systems.com/articles/2/behavior-trees-in-unity-with-behave&lt;/a&gt; .&lt;/p&gt;</description>
				<published>2008-11-30 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/11/30/community-tutorial/</link>
			</item>
			
		
			
			<item>
				<title>New tutorial</title>
				<description>&lt;p&gt;Just added a second tutorial &amp;#8220;Taking advantage of &lt;span class=&quot;caps&quot;&gt;OOP&lt;/span&gt; in agents&amp;#8221;. It is now available in the Tutorials section of the Documentation page.&lt;/p&gt;</description>
				<published>2008-11-28 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/11/28/new-tutorial/</link>
			</item>
			
		
			
			<item>
				<title>First tutorial available</title>
				<description>&lt;p&gt;Check it out in the Tutorials section of the Documentation page.&lt;/p&gt;</description>
				<published>2008-11-04 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/11/04/first-tutorial-available/</link>
			</item>
			
		
			
			<item>
				<title>Behave 0.3b</title>
				<description>&lt;p&gt;Fixes and additions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Various tweaks to the editor UI&lt;/li&gt;
	&lt;li&gt;Optimised the compiler&lt;/li&gt;
	&lt;li&gt;Fixed the following editor bugs from the bug list:
	&lt;ul&gt;
		&lt;li&gt;When the editor scrips are recompiled and when the user enters and exits play mode, running editors will loose references, causing undetermined behaviour&lt;/li&gt;
		&lt;li&gt;When a compile fails, the Behave compiler is locked and unusable &amp;#8211; requiring a unity relaunch&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Implemented the following wishlist items:
	&lt;ul&gt;
		&lt;li&gt;Behaviour tree decorators&lt;/li&gt;
		&lt;li&gt;Stand-alone edition of the Behave editor&lt;/li&gt;
		&lt;li&gt;Behaviour tree debugging features&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2008-11-02 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/11/02/behave-03b/</link>
			</item>
			
		
			
			<item>
				<title>unite '08 open-mic session</title>
				<description>&lt;p&gt;At this years unite, David and Tom (of unity3D) persuaded me to do an open mic session a day into the conference. I&amp;#8217;ve been informed that this session was captured on video, so as soon as it is available to me, I&amp;#8217;ll make it available here. I had one day of preparation for this while attending the conference, so I have no idea of its usefulness, but I guess it&amp;#8217;s better than nothing. Stay tuned.&lt;/p&gt;</description>
				<published>2008-10-25 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/10/25/unite-08-open-mic-session/</link>
			</item>
			
		
			
			<item>
				<title>Behave 0.2b</title>
				<description>&lt;p&gt;Fixes and additions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Made the demo project a whole lot more interesting&lt;/li&gt;
	&lt;li&gt;Implemented the editor wish list item: Ability to move trees between collections&lt;/li&gt;
	&lt;li&gt;Various tweaks to the editor UI&lt;/li&gt;
	&lt;li&gt;Fixed a ton of bugs in the compiler&lt;/li&gt;
	&lt;li&gt;Fixed the following editor bugs from the bug list:
	&lt;ul&gt;
		&lt;li&gt;Not able to delete collections from library&lt;/li&gt;
		&lt;li&gt;Not able to delete trees from library&lt;/li&gt;
		&lt;li&gt;Not able to rename collections from library&lt;/li&gt;
		&lt;li&gt;Not able to rename trees from library&lt;/li&gt;
		&lt;li&gt;Missing &amp;#8220;tree has been changed, save changes?&amp;#8221; dialog&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2008-09-24 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/09/24/behave-02b/</link>
			</item>
			
		
			
			<item>
				<title>Behave 0.1b</title>
				<description>&lt;p&gt;Fixes and additions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Some documentation is available&lt;/li&gt;
	&lt;li&gt;Compiler is now creating sensible output&lt;/li&gt;
	&lt;li&gt;A simple test tree and script using it is provided with the demo&lt;/li&gt;
	&lt;li&gt;Documentation is linked directly from the unity help menu&lt;/li&gt;
	&lt;li&gt;Less spamming of the log with debug information&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2008-09-09 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/09/09/behave-01b/</link>
			</item>
			
		
			
			<item>
				<title>Behave pre-release</title>
				<description>&lt;p&gt;The purpose of this pre-release is to let the curious try the waters. It is shiny, but don&amp;#8217;t build a project around it just yet.&lt;/p&gt;
&lt;p&gt;Currently the editor is functional, assets can be loaded and saved, the compiler runs and results can be tested. However some minor features are not yet available in the editor, compile results are faulty to say the least and very little testing has been done. Run it at your own risk as usual.&lt;/p&gt;
&lt;p&gt;Finally the license will be revised. Currently I just duplicated the license from the Path project in order to get this boat floating asap. Documentation will be available shortly.&lt;/p&gt;
&lt;p&gt;Specs:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Available for indie as well as pro&lt;/li&gt;
	&lt;li&gt;Can run in webplayers as well as stand-alone&lt;/li&gt;
	&lt;li&gt;Requires no additional installations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Features:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Implements behaviour trees&lt;/li&gt;
	&lt;li&gt;Re-use common behaviour by reference&lt;/li&gt;
	&lt;li&gt;Drag and drop editor interface inside the unity editor&lt;/li&gt;
	&lt;li&gt;Simple connection to character actions via C# interface&lt;/li&gt;
	&lt;li&gt;Designed trees are built to .net assembly code for maximum performance&lt;/li&gt;
&lt;/ul&gt;</description>
				<published>2008-09-08 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/09/08/behave-pre-release/</link>
			</item>
			
		
			
			<item>
				<title>Path beta 0.3b</title>
				<description>&lt;p&gt;Fixed some more bugs and improved on the path seeking algorithm which is now not limited to a single orientation of an entire mesh. For instance a PathFinder will now be able to walk up the walls, across the ceiling and back onto the floor if you so desire.&lt;/p&gt;</description>
				<published>2008-04-15 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/04/15/path-beta-03b/</link>
			</item>
			
		
			
			<item>
				<title>Path beta 0.2b</title>
				<description>&lt;p&gt;In this version several bugfixes have been implemented and additional debugging information has been made available. See online documentation for more information on bug reporting.&lt;/p&gt;</description>
				<published>2008-04-12 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/04/12/path-beta-02b/</link>
			</item>
			
		
			
			<item>
				<title>Path beta 0.1b</title>
				<description>&lt;p&gt;In this version, the interface of the Path library has gone through some radical changes and should be much easier to use and adapt to special needs.&lt;/p&gt;
&lt;p&gt;The demo project now also includes a unit controller for units using the unity character controller interface which also demos how animation could be used in Path projects.&lt;/p&gt;
&lt;p&gt;Also a range of bugs have been corrected (and no doubt new ones introduces so please toss all the feedback you can come by at me). Last but not the least Path is now almost feature complete which means feature requests will be considered at this point.&lt;/p&gt;
&lt;p&gt;Dig in!&lt;/p&gt;</description>
				<published>2008-04-05 00:00:00 +0200</published>
				<link>http://www.angryant.com/2008/04/05/path-beta-01b/</link>
			</item>
			
		
			
			<item>
				<title>Path pre-release</title>
				<description>&lt;p&gt;This version of the Path project implements the A* algorithm on a user-provided NavMesh. It includes support for multiple inter-connected NavMeshes in one scene and provides an easy to use interface for requesting and handling calculated pathes.&lt;/p&gt;
&lt;p&gt;Updates and feedback takes place on the unity forums: Pathfinding in unity.&lt;/p&gt;</description>
				<published>2008-03-30 00:00:00 +0100</published>
				<link>http://www.angryant.com/2008/03/30/path-pre-release/</link>
			</item>
			
		
	</channel>
</rss>