[Unity3D] #DEVELOPMENT_BUILD not working in PreBuild Script IPreprocessBuildWithReport

I was trying to get some logic to work in a PreBuild script whether the build is a development build or not using the define symbol #DEVELOPMENT_BUILD. It works in regular scripts, but apparently it doesn't work for PreBuild scripts because the symbol won't be defined until the build actually starts. So the #DEVELOPMENT_BUILD never actually hits even though you have "Development Build" checked in the Build Settings.

To check whether or not your build is a development build use:

var isDev = (report.summary.options & BuildOptions.Development) != 0;

In the PreBuild script it would look like this:

public void OnPreprocessBuild(BuildReport report)
{
   var isDev = (report.summary.options & BuildOptions.Development) != 0;

   if (isDev) {
    // Is development build
   } else {
    // Normal build
   }
}

Source: https://qiita.com/Clpsplug/items/c34e8f596e54444623ba


[FIX] Unity3D Cloud Build Missing Sprites

I was making a build the other day using Cloud Build, but some of the sprites were missing for some reason. Everything looked fine on a local build though.

Turns out I had the sprites in a folder called "Library" in my Unity Project and Cloud Build ignores or strips out content from that folder. The sprites showed up again in the cloud build after renaming the folder.


[Fix] Google Play - App 0 Supported Devices


I had this issue the other day saying my app upload to the Google Play Store has 0 supported devices. After hours of checking and testing everything, the issue was found in the AndroidManifest.xml.

<uses-feature android:name="android.hardware.autofocus" />

Which should be:

<uses-feature android:name="android.hardware.camera.autofocus" />

The camera autofocus is a feature added by Vuforia in Unity3D, and it probably never updated the manifest file after I've updated Vuforia. The "0 Supported Devices" was gone and app was showing supported devices again the developer's console after fixing that line in the manifest file. If this fix didn't work then it might be a good idea to check the other <uses-feature> and https://developer.android.com/guide/topics/manifest/uses-feature-element.


[How] Bypass Unity3D's "Hold on" Import on Launch

Sometimes it takes forever for Unity to launch. Especially when you have a lot or large assets. For some of our projects it could take hours for Unity to actually launch the editor. It's super annoying and you can't do anything else in the meantime. But there is a way to skip all that in the newer versions of Unity.

If you're having this problem, start a new project with a particular Unity version so you can actually get into the editor. Then go to Edit > Preferences > General and UNCHECK "Compress Assets on Import". Now close the project and open your actual project and it should launch way faster!


[HOW] Find Old Firebase SDK Versions for Unity3D

The SDK link on the Getting Started with Firebase page automatically downloads the latest Firebase SDK. Quite annoying if you're looking for an older version if you want to re-import an older SDK for your project for example. Luckily there's a way to download the older versions. Just enter the version number that you want in this link  https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_{Version number}.zip.

For example, if you're looking for version 6.0.0, the download link would be https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_6.0.0.zip. That's it!

Source: https://stackoverflow.com/questions/49921164/old-versions-of-firebase-for-unity-firebase-sdk-4-5-0


[FIX] Unity3D - Moving Files Failed Error When Making Build

I've been playing around with some Unity3D plugins lately. Trying out different ones to see what works and what doesn't for my Infinite Meow game. At some point, I was trying out the Google Play Game Services  plugin and got this error message when I was trying to make an Android build which prevented me from finishing the build.Read more


Why Can't I Report Scam & Phishing Emails On Outlook.com Beta?

A new beta version rolled out a few months ago with a new look and feel, together with some interface changes. Overall, it's an improvement with a few quirks, but there's one thing that really bothers me. They've removed the option to mark and report an email as "Phishing scam" if the email is in your inbox folder. This is annoying because I do get sketchy emails sometimes that get passed their spam detection. Especially the ones that look like it's from Apple or PayPal, which look pretty authentic at first glance. In the old outlook.com, you could mark it as such by going to "Junk > Phishing scam".Read more


[How] Parse.com Get Data as Multidimensional List in Unity3D C#

I recently found that you're able to save multidimensional data to Parse. Saving the data wasn't a problem though, but getting it back from a ParseObject took me a while before I finally got it working.Read more


[FIX] Unity3D - Android - Unable to List Target Platforms

A few months ago I was trying to create an Android build for one of my Unity3D projects which used to be primarily for iOS. When trying to create a build, Unity showed this error:

Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct.

Read more


[FIX] Unity3D - Android Keyboard White Text on White Background

The Android Keyboard text appears to be white on a white background for some reason (at least in Unity 5.5.1f1 and below) when testing on an Android device. So there's no way for the user to tell what the current input text is unless they highlight it. Not sure if it's an actual bug on Unity's end or if there's a styling conflict caused by multiple Android manifests. Luckily, there's a quick way to fix this.Read more