Unity Remote

Simple solution to not working Unity Remote on your tablet/phone, its easy:

ON YOUR DEVICE (tablet , phone):

1) Enable "Developer Options" (Settings-Build Number click there 7 times)
2) Enter on new created "Developer Options" and enable USB DEBUGGING, STAY AWAKE and ALLOW MOCK LOCATIONS

thats it, it should be working now, connect device to usb and run unity.


Google Play 64-bit Requirement in Unity

This is a 2019 August requirement for our Android apps, it must be 64-bit complaint,
How to do it?

Simple, take a look at the answer:


Go to File > Build Settings > Player Settings > Other Settings
Change "Scripting Backend" to "IL2CPP", and make sure all boxes under "Target Architectures" are checked.

Now, as of Unity 2018.3 (which is the version I'm using here), there's an option in Build Settings to export to an App Bundle, which is what I did and seems to be the recommended thing to do moving forward.

If you try to build now, it will fail unless you have the Android NDK installed


Facebook Login for Unity

Sometimes we need to add "Facebook login" to identify a user on our game / app.

For that, its available the Facebook SDK, but also we need Openssl and java.

For the purpose of login in and getting scores, we can use a ver useful Asset, I use it, EasyLeaderBoard, and heres how to config:

1- Create your app on "Facebook developers page", and copy "APP id".

2- Go to Unity, menu "Facebook"-"Edit settings", and paste the app id. You will get two texts (package name and class name), copy and paste them on "Facebook developers page", and save changes.

*You can get an error on Unity saying "Openssl not found", or "Keytool not found", follow these steps: (from vfxjex at https://answers.unity.com/questions/616484/open-ssl-not-found.html)

1) Download and install OpenSSL. http://slproweb.com/products/Win32OpenSSL.html
 OpenSSL v#.#.# (not Light)

2) Add the OpenSSL directory to your path.

Go to: Control Panel > System > Advanced system settings > Environment Variables

Select the Variable "Path" in the "System variables" window and click Edit.

Add the path >> ";C:\Program Files\OpenSSL-Win64\bin"

3) If you get the "Keytool error", you need to add the JDK (Java Development Kit) bin directory to the Path variable value >>  JDK bin path. e.g. I added ";C:\Program Files\Java\jdk1.7.0_45\bin" to the end of the value text.

Restart Unity3D.


Keyhash on Facebook Developers

In some apps we need to use a "Facebook login", for our apps or games in Unity. (setting scores, etc)

For that purpose, we must provide a "Hashkey" for our game to work, and put that keyhash on our Facebook developer page (https://developers.facebook.com/apps/YOURAPPID/settings/basic/)

¿how to get our app Hashkey?
with keytool command:
1: (install if not already, OpenSSL in c:\Openssl)
 2: (go to your jdk dir)  cd C:/Program Files/Java/jdk1.8.0_181/bin

3: keytool -exportcert -alias fq2 -keystore "C:\Users\joe\Documents\PATHKEYSTORE\APP.keystore" | C:\OpenSSL\bin\openssl sha1 -binary | C:\OpenSSL\bin\openssl base64

Thats it! You will get a 28 digit Hashkey, you must put it on your Facebook App on facebook:

 (if your app says: " 28digit Hashkey not recognized" copy that "28digit" hashkey on the same facebook developer app.)


Moving Projects

To move a project between Computers in Unity (i.e. Computer to laptop, etc) you can do it safely as is:

To copy / move a Unity project:
  1. Enable Version Control Meta Files in Editor Settings
    (This will add a .meta file for each file and folder in your project)
  2. When copying, do not copy the Library folder or the Temp folder (if at all exists).

  3. In most normal circumstances, you only need to copy the Assets and ProjectSettings folders.

    *After copying and opening in Unity, it will automatically generate the Library folder based on your meta files. 


Fixing Intellisense in Visual Studio

There is a common issue on Visual Studio Community, used in Unity, when installing the first time:

Many times, it happened to me, Intellisense does not work inside Visual Studio.

Whats Intellisense?
- Its the autocomplete feature, when writing sentences, and its a basic feature for programming.


Its hard to find a solution, but its easy to make:

1-  Close VS, if opened.

2- Enter your project folder, and delete .vs folder.
3- Then, open VS and it will require to install .NET features: do it, and restart your computer.

Now, problem solved.

Hope it helps to programmers.


Joseph Oli


Fixing Android app "crash" when logging GoogleGamesServices ( Unity )

Sometimes you "Build and run" your Unity app on your mobile device and works fine but...
When login to "GoogleGamesServices" your app crashes.

Heres the solution, you must edit your AndroidManifest:

1) Open AndroidManifest: 
(inside "Project":  "GooglePlayGames / Plugins / Android /GooglePlayGamesManifest.plugin")

2) edit APP_ID in androidmanifest:

replace "\ " with "\u003

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ 232323232323" />

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\u003232323232323" />

Fixing "Build Failure:Unable to retrieve device properties" error (Unity)


We are looking today to a disappointing Unity error, that shows sometimes when developing for Android devices.

When you try "Build and Run", sometimes you can get the following error: "Build Failure:Unable to retrieve device properties"

So, here´s the solution:

1- Kill adb.exe process   (ctrl+a+t+supr to open task manager, and "end task" "adb.exe")
2- Restart your android device.

Thats all, your Build and run should be running fine again.

Feel free to leave your comments!



Acceder al Text de un Objeto por C# -- Access "Text" property of an Object with script


Hoy veremos como acceder / editar el "Text" de un GameObject, utilizando sólo C#, sin necesidad de utilizar el Inspector.


Nombre del GameObject: titulo_opciones
Objetivo: modificar el texto.

1 - Muy sencillo, declaramos la variable al inicio
2 - Luego utilizaremos la segunda línea para buscar, mediante su nombre, el Gameobject.
* Dentro de la misma línea, le diremos que queremos su propiedad "Text" (podemos usar cualquier otra que tenga).
* Lo asignamos a nuestra variable (texto).
3 - En la tercera línea, le modificamos el valor y se reflejará automáticamente en nuestro programa.

       public Text texto;


       texto = GameObject.Find("titulo_opciones").GetComponent<Text>();

       texto.text = "Opciones";


Today we will see how to access / edit the "Text" of a GameObject, using only C #, without using the Inspector.


Name of the GameObject:

Goal: modify the text.

1 - Very simple, we declare the variable at the beginning (texto)

2 - Then we will use the second line to search, through its name, the Gameobject.

* Within the same line, we will tell that we want 
"Text" property (we can use any other that it has).

* We assign it to our variable (texto).

3 - In the third line, we modify the value and it will be automatically reflected in our program.


Android permissions

* Don´t ask for permissions, android:
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />

<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
(put it on: "GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin", 
inside "AndroidManifest")


Google Play Game Services en Unity3D

Google Play Game Services en Unity3D:

How to Config:
1) Install in Unity (Import package):
(current build)

2) Configure in unity: Window > Google Play Games > Setup > Android Setup

- Create "keystore" and save it (game.keystore).
- Get "SHA1" with "keytool" (see point 3).
- Create app/linked app/leaderboard un Google Play Console.

Constant Class: this can be whatever you want, just give it a name

Resource Definition: in your google play console, go to "game services" and to your app (or "Add New game".
 Select either leaderboards (marcadores) or achievements (create them if you've not set them up) and at the bottom you'll see the 'get resources' link. Click that (it will show new window) and paste it into the box in Unity.

Client ID: also in the game services, go down to linked apps (again, assuming you've already set this up) and click on your game from the list. At the bottom copy the string under "OAuth2 Client ID".

3) Code:

*Before Build*
edit APP_ID in androidmanifest:

replace "\ " with "\u003

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ 232323232323" />

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\u003232323232323" />

C:\Users\XX\AppData\Local\Android\Sdk\platform-tools> adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

*Be sure to uncheck "Development Build" in "File-Build settings", before build.

Unity Remote

Simple solution to not working Unity Remote on your tablet/phone, its easy: ON YOUR DEVICE (tablet , phone): 1) Enable "Developer ...