Désolé, cet article est seulement disponible en Anglais Américain. Pour le confort de l’utilisateur, le contenu est affiché ci-dessous dans une autre langue. Vous pouvez cliquer le lien pour changer de langue active.
Hey,
As a mobile game developer you need to deploy your game on multiple devices, especially on Android devices.
Unity can only Build and run on ONE device.
If you connect several devices the build will be run on one device only.
So if you want to install and run an .apk file on all connected devices you can use this script:
Create a file named push_apk_all_devices.sh
Copy and paste this script:
push_apk_all_devices.sh
Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# 1. Set up these constants
# 2. Launch the Shell script with: "sh push_apk_all_devices.sh" in a terminal window
Désolé, cet article est seulement disponible en Anglais Américain. Pour le confort de l’utilisateur, le contenu est affiché ci-dessous dans une autre langue. Vous pouvez cliquer le lien pour changer de langue active.
In the previous post we learn how to get the current volume.
As I said the max volume can be different according the OS version or de device.
Now let’s get the max volume in c# without native plugin:
Désolé, cet article est seulement disponible en Anglais Américain. Pour le confort de l’utilisateur, le contenu est affiché ci-dessous dans une autre langue. Vous pouvez cliquer le lien pour changer de langue active.
Sometimes you need to check the Wifi connection of the device on mobile for several reasons.
In order to get the permission to get the Wifi state you have to add this permission in the AndroidManifest.xml file:
Désolé, cet article est seulement disponible en Anglais Américain. Pour le confort de l’utilisateur, le contenu est affiché ci-dessous dans une autre langue. Vous pouvez cliquer le lien pour changer de langue active.
In this tutorial I will show you how to generate and import bitmap fonts in Unity3D with ShoeBox and GlyphDesigner.
UPDATE 07.07.2016: An Unity asset store plugin can convert your bitmap fonts for free: https://github.com/lite3/Unity-BitmapFontImporter
UPDATE 11.17.2015: Littera is an online tool. It works great and it’s free: http://kvazars.com/littera/ UPDATE: Unity 5.x, I updated the script but there is an issue with the space interline.
ShoeBox is a free Adobe Air based app for Windows and Mac OSX with game and ui related tools. Each tool uses a drag and drop or clipboard interaction for a quick workflow.
How to generate the required files to import your custom font with ShoeBox?
Watch this video bellow but export with the template: FNT-xml Starling. Yes! Starling! :). The BitmapImporterScript.cs script needs a .XML file format.
The video tutorial:
Import the .xml and the .png files in your Unity Assets folder.
Follow the next step of the tutorial in the next chapter after this one.
Export a bitmap font with GlyphDesigner
Glyph Designer is a powerful bitmap font designer. Create beautiful designs using highly configurable effects, definable backgrounds and more. Make the most of your screen with smart zooming and full screen support. Target hundreds of devices on multiple platforms with support for over 15 frameworks out the box. Streamline localizations with GDCL.
How to generate the required files to import your custom font with GlyphDesigner?
Download and install GlyphDesigner for Mac or Windows
Create your own custom bitmap font with all the glyphs you need
Click on the Export button
And select Export Type > .xml (BMFont XML)
Click Save
Import the .xml and the .png files in your Unity Assets folder.
Follow the next step of the tutorial in the next chapter.
Import and use the bitmap font in Unity
Import the BitmapFontImporter.cs file in your Unity Assets folder.
Then do a Right Click on the .xml file
Click Generate Bitmap Font
The Script should generate a .material and a .fontsettings file
Now we use the font you just created in your scene
Create an UI > Text game object in your scene
Select the UI Text game object
In the inspector go to the Text(Script) component and add the .fontsettings file in the Character >Font field
Then add the .mat file in the Material field
Never use the Font Size value in the component but use the Scale of the game object instead