[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