Tagcsharp

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 (: