CategoryUnity

Easy Movie Texture For Android Version: 2.18

Whoever uses the Easy Movie Texture For Android (Video Texture) version 2.18 and also uses split apks (obbs) in unity might run into problems with the streaming asset sub-folders. It’s a great plugin to handle rendered textures on mobile devices.

However the plugin fails to create sub-directories while copying videos out of the obbs into their respective sub-folders. Which can fixed by adding

in the MediaPlayerCtrl.CopyStreamingAssetVideoAndLoad.

So it looks like this:

Also in order to have a e.g. complete callback, simply add a

in the same class and call them at the respective m_CurrentState checks:

I’ve already e-mailed the fix to Lee JaeYun and it will be fixed in a later version presumably, until then use the fix and enjoy.

Soundlooper

Soooo Albért and Marco were visiting me the past week. They needed a couch to crash in Berlin to watch the football world championship. Congrats to Germany by the way for winning the champion ship! Anyways, Marco works as a DJ and he was playing around with his laptop to generate some random sounds. That got me inspired to create a little app over night. It basically loops through a matrix of matrices of tones and plays them that’s why the name Soundlooper. Pure creativity I know, right? xD


Unity: Change Build Settings like splash screen, app icon programmatically / dynamically.

For a project at work I needed a way to swap the splash screen, app icon and package name in order to build 8 different themed apps. So here is a way to do it. This script creates a menu entry where you can simply select the specific build and change almost every build setting. Feel free to add any missing qualifier. (UnityEditor.PlayerSettings)

Unity: Start Coroutines on main thread or anything else for that matter

In case you do some asynchronious stuff like updating a game object after a network response in unity, you might come to a point where you want to do something you which can only be done within the unity main thread. So here is a little trick which let’s a certain method be called on the next opportunity of the game loop.

1) Create a gameobject in your scene and add a this script

2) Add your coroutine action into the queue whenever you want to call it like this:

Of course you can add any action to the main queue at any point and whereever you want. Enjoy (:

Unity: Rescaling Fonts

Hey guys, I’m doing some unity stuff. So far it’s great, however I still have some difficulties about scaling towards respective resolutions for mobile devices.

In general: I appreciate every suggestion!

So far I came across:

for scaling simple 2D textures. And a little script for rescaling fonts:

Where you add this script to a label or something and change its effective font size. So it will at least look a like amongst multiple devices. It scales all right but it doesn’t feel too reliable yet. Any suggestions?

How do you guys handle your ui sizes with unity?