Unity – auto set Android password in project

Hey, it’s time for an other tip today!

There are small details in Unity which can make you crazy: compiling an Android project with the correct certificate request you to provide the password each time you open the project. Ok, that’s not a big deal! But the problem is: if you miss to write it and launch the compilation it will be at the end of the process than you will be informed you didn’t set it up and so it fails. With a 30 minute build time (on a big project), if you miss it, you’ve the right to be angry! Why the hell Unity doesn’t check it before!?

Anyway let’s make a small Editor Script:

using UnityEngine;
using UnityEditor;

[InitializeOnLoad]
public class StartUp {

	#if UNITY_EDITOR

	static StartUp() {

		PlayerSettings.keystorePass = "myPwd";
		PlayerSettings.keyaliasPass = "myAliasPwd";
	}

	#endif
}

Thanks to this script, when the project will be opened the password will be registered!

Ok an other thing to figure, the keystore path is saved in your ProjectSettings.asset. So the path need to be changed on each computer. Not a big deal, but it could be done automatically if it’s near your project. On the script above, add:

PlayerSettings.Android.keystoreName = Application.dataPath + "/user.keystore";

The last thing to do would be to reset this path when Unity goes in the background so you can git push/pull without creating conflict. Unfortunately I can’t find a way to detect correctly when Unity goes in background, see http://forum.unity3d.com/threads/trapping-if-unity-editor-is-foreground.271391/. Do you know a way to do it?

Unity – fast build platform switcher script!

Today a quick tip for a huge trick!

Working with Unity is pretty awesome until you have to make a build on an other platform than your current one! Depending your project size (number of assets etc.), just changing your current platform for Android to iOS or vice versa could take one hour… yup seriously! During that time you won’t be able to work on your project and your computer’s CPU will be pretty busy… so time for a long break? Until now!
Continue reading Unity – fast build platform switcher script!

A Blind Legend Desktop : Standalone and Steam

Hello everyone ! So this blog post will cover what we did to create the desktop version of A Blind Legend and its release to the Steam store.
You can access the store page here and maybe try out the game in its desktop version !

If you are not familiar with the game, it was intended for mobile devices first and we covered its development in this previous blog article that you might want to take a look at first.

Due to the license agreements when you sign up to be a Steam/Steamworks developer, we cannot specifically talk about the publishing process itself. Nonetheless we can share our impressions and what was specific to this project !

BL_artwork_SD_02
Continue reading A Blind Legend Desktop : Standalone and Steam

“Zip zip” avatar creator and character animation capture

“Zipizator” is a mobile app created by Ludo and Hyperfiction we developed to accompany the Zip Zip french animated television series’s release on a french channel.

It was fully created with Adobe Air.
Continue reading “Zip zip” avatar creator and character animation capture

Meet Hutch the best friend of Starxi!

Hey folks, today I’m glad to introduce you Hutch. This post follows my thoughts from a previous one. I was looking for the next tech for providing mobile, desktop and web games. Starling is great, but since Flash Player is dead again, its future is less brighten. I used Flambe in the past, and was pretty happy but today it isn’t supported anymore (though we’re waiting a long time announced update!).

Looking for a good cross-platform 2D engine
I looked the interesting series of blog post by Prime31 seeking for the best 2D game engine/platform. He finally choose MonoGame, but unfortunately for me it doesn’t export for the web. In his evaluation it meets many Haxe frameworks and LibGDX. Being not so much familiar with Java and with the death of RoboVM I don’t considered LibGDX as an option.
Concerning the Haxe libraries, my issue is still the same: there aren’t enough Native Extensions (except for Flambe which targets AIR) and the js minified is close to 1Mo.

On an other part, I enjoyed working with Pixi.js and Haxe thanks to this extremely well supported externs. Unfortunately, targeting mobile application with HTML5 is a nightmare. Cordova‘s performance aren’t really good and Cocoon is just an expensive black box…

So what was the solution?
Continue reading Meet Hutch the best friend of Starxi!

Retrieving the names of your scenes at runtime with Unity

Retrieving the names of your scenes at runtime with Unity is a common problem. The API of Unity doesn’t provide an easy way do to so. With the quite recent SceneManager, I thought Unity had finally provided something to get information about your scenes you have added in the Build Settings. No way !

I faced this problem when implementing a little configuration GUI, where the user has the possibility to indicate the order the scenes will be played. Yes, I could have hard-coded this, but it’s not the elegant way in my opinion. Thus, I made some investigations to get once for all the names of my scenes.

Continue reading Retrieving the names of your scenes at runtime with Unity

Playing with VR and Unity

Today, Virtual Reality (VR) may be the hottest topic for interactive developers (Augmented Reality will be the next within few years for sure). Many constructors propose their own Head Mounted Device (HMD) : HTC & Valve with the Vive, Oculus, with their Oculus Rift and Gear VR for Samsung mobiles, Google and the very cheap DIY Google Cardboard, and many other ones. Naturally, Unity, which is the leading global game industry software (45% market share, 47% of developers), rapidly proposed built-in functionnalities to handle some of the VR devices.

In the end of the last year, we have been asked to create Unity tools to quickly prototype virtual visits with the Google Cardboard. It was the perfect project to dive deeper in the world of VR. Here, virtual visits were a set of photo-spheres and video-spheres, which are respectively photos and videos projected inside spheres, giving you the impression you are surrounded by the scenery (think about Google Street View). Furthemore, some parts of the photo-spheres had to be interactive and display some additional content like photos, videos, text, …

Continue reading Playing with VR and Unity

Reset git repository to a new commit

Git is an awesome version control system, popularized by Github. Working on a big project, you might need to add (huge) binaries, or libraries, or even psds, videos… to your repository. We’ll not judge this method, it has its pros & cons. The fact is: if those big files change often, your repository will increase very quickly. And sometimes your own code versioning is not a big deal. It’s stable, and for newcomer it doesn’t need all the git history and its 4Go (yeah, I already experienced that). So let see how to reset your git repository to a new commit:

Firsty, save your local .git/config file somewhere on your disk. Then:

rm -rf .git
git init

Import and overwrite your previous .git/config file. Then:

git add .
git commit -m "Repository reset"
git push -f origin master

Et voilà!

A cool thing to notice is on Github and Bitbucket, you won’t lost data subscriptions, stars & forks.

Maybe you need a backup on a specific URL just in case…? Just create a new repository, and in your .git/config file change the url and push 😉

Encoding BitmapData using AS3 Worker

Though AS3 Worker class is available since a while, its introduction on iOS is recent: less than 6 months. With AS3 workers being available everywhere, it’s about time to create small libraries multi-threaded with just a few lines of code!

If you never played with Worker, you should give a look to this great series of blog post.

There are several ways to create Worker, but if you don’t want to fall in a pitfall while using ANEs in your project, I recommend to use them via a loaded SWF.

So here is a small example making a simple library for encoding bitmap data and save images on disk via a Worker:
Continue reading Encoding BitmapData using AS3 Worker

From Unity 2D to Unreal Paper 2D

The Game Developers Conference is coming quickly and we’re impatient to hear the announcement from the big guys!

Since a while I wanted to give a try to the Unreal Engine. I’d no doubt that it could outperformed Unity on complex 3D rendering stuff, but for this first test I focused on simple 2D stuff to get familiar with the user interface, engine build process, scripting… Unreal Engine sounded like an indomitable beast in my mind (I spent hours on Unreal Tournament when I was young) but coming from an Unity background, the beast was easily tamed! If you never tried the Unreal Engine, the first thing to do is to check the Unreal Engine 4 For Unity Developers!
Continue reading From Unity 2D to Unreal Paper 2D