Unity3d Process Calls, Zipping, Command line and Window console Snippets

Recently being making a little utility app for transporting and playing local  html5/jquery based presentation from pc to ipad etc, below are some snippets of code for starting stopping other apps such as chrome browser, cmd.exe, I did these in xamarin/mono really easily however the transfer to  unity was a little taxing on the more involved processes, certainly adding /C before a command line argument was new to me, strangely. Below also includes some code for zipping files in unity3d using 7-zip of 7za.exe, although I’ve used internal .net libraries before sometime 7za for a unity windows stand alone solution is certainly quick and easy.

Unity3d/.Net c# code:-

 

 

By |August 27th, 2013|CodeBlog, Unity 3D|Comments Off on Unity3d Process Calls, Zipping, Command line and Window console Snippets

BBC News – Alfredo Moser: Bottle light inventor proud to be poor

The BBC posted an article about the Brazilian Alfredo Moser, who rather ingeniously uses plastic bottles, daylight, water and bleach to help light up his house without electricity during the day at very low installation cost, the idea is already spreading around the world, read more:-
BBC News – Alfredo Moser (click to visit article).

By |August 13th, 2013|Blog, Miscellany|Comments Off on BBC News – Alfredo Moser: Bottle light inventor proud to be poor

Website Rebrand 2013

redesignFinally adding the finishing  touches to the new website / re-brand, feel free to contact me if you can’t find something from the old site! Plenty more content from the last few years to be added shortly, and over time some better tutorials/code and news to be served, take care and thanks for visiting.

By |August 5th, 2013|Events|Comments Off on Website Rebrand 2013

Remove Invalid Filename Path Characters

If you find yourself having to strip illegal chars from user input, as I have found myself doing on numerous occasions when dealing with files and directory paths in Unity, it is always a good idea to have a method/function handy and at the ready, there are of course many ways to do this and I know that some would lean towards Regex as I have also done in the past, but here’s my adapted unity 3d – c# .net offering that also does what it says on the tin.
(more…)

Unity3d handle pre and post build ops

PostprocessBuildPlayer scripts do not fire on windows machines to date, and a pre process script for unity does not exist in the public domain, so here is an editor script which adds two custom buttons to your menu:- Custom Build, and Custom Build-Run. The purpose of this script is to allow you to handle any file copying or amendment to the build folder pre or post build automatically.

The script takes all the information required from the normal build window options into account, when executed manually it allows the user to choose a save path, it then fires a pre-process function before building and post process function after building and the build path is sent as a parameter, from within these functions you can call whatever you heart desires from c# file copying code to calling other applications and sending parameters alongside

(more…)

By |November 11th, 2011|Unity 3D|4 Comments