Monday, 30 October 2017

Android Native Plugin

Android Native Plugin
Introduction:
So here are two versions of this plugin. In Free version you can open gallery and select Image of any type + Android native toast , android dialog box and loading box. But Pro version provided you some additional functionality such as you can select any type of file i.e, audio,video,jpeg,png.fbx.txt and pdf by passing filter type as well as you can open camera for Image.


Link:
Free:

Features:
  • Show Toast.
  • Show Dialog Box.
  • Show android Spinner.
  • Select Image of any type (free).
  • Select File of any type (pro).
  • Open Camera (pro).


Documentation:
This plugin have a Scene name “AndroidNativeDemo”. Open the scene and Switch to android platform and run the project.

  1. This scene have GameObject name “AndroidNativePluginGO” which communicated with android library. All type of message pass to this GameObject.
  2. Demo.cs script attach to Canvas object. All buttons “On Click” event refer to demo script.
  3. You need to change player settings Go to player setting of android and change Install location to “Automatic”, internal access to “Auto” and write permission to “External (SDCard) “ or just attach “Change Settings” script to “AndroidNativePluginGO”.
  4. So if you want to integrate this plugin with your scene. Then create an empty game object having name “AndroidNativePluginGO” in your scene and attach two scripts name “AndroidNativeController” and “ChangeSettings”. All set for this plugin now
  5. If you are going to use File Picker or Image picker ( Open Gallery Function) then on file selection from device “OnFileSelectSuccess” event in “AndroidNativeController” fire.
  6. For further understanding see the Demo script and run the demo project.

Update:
Pro Version is just release( 3-March-2018 ). It will be available no asset store soon!

Friday, 1 September 2017

KBC

KBC

Introduction:
This project is related to Indian show “Kaun Banega Crorepati” in which host ask some question and other person give answer. But in this project we already have some questions in file that will load up during when program runs.

Purpose:
Purpose of this project is to give you an idea how binary file handling works in c++. How you can randomly generate question from file and how to read from file.

Links:
Here is the link for bitbucket:

Features:
  • Binary file handling.
  • Using of struct in c++
  • Reading from file
  • Generating question from file

Usage:
  1. Run the project
  2. Press enter and timer will start
  3. Question and their multiple answers will be shown up
  4. You can use lifeline
  5. Score will be shown to the top right side of screen.
  6. If you give wrong answer then game will end.

Tic Tac Toe

Tic Tac Toe

Introduction:
Tic-tac-toe is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3, 4 x 4 and 5x5 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
The following example game is won by the first player, X:


Links:
Here is the link for bitbucket:
https://bitbucket.org/waqas_hashmi/tictactoe/overview

Features:
  • ·         Single Player Feature ( You vs Computer)
  • ·         Multiple Player
  • ·         Code is Generic means you can play 3x3 , 4x4,5x5 and so on…
  • ·         Computer Intelligence
  • ·         Save Game and Delete Game
  • ·         Modular code you can change it easily

Usage:
  1. Run the Code
  2. First read the instruction and then press any key for continue.
  3. Menu will appear, ask you for save game , new game and delete game. Press 3 for New game.
  4. Menu will appear, ask you multiplayer or single player. Enter you choice.
  5. Menu will appear, ask you which type of Grid you want to play. Enter you choice.
  6. Play your game. If you want to save game press S/s or for exit press E/e.

Auto Localization



Auto Localization

Introduction:
So basically this plugin can be used for language Translation in unity. There are other translator on asset store but they charge high cost for providing auto translation.

You can use this plugin for translating your words in game such as some time English is your 2nd language and it is difficult for you to understand it and you change the language by going in settings of game. You can do it using this plugin.

Purpose:
·         You can change from 2nd language to your native language by using it in your game.
·         Thousands of people around the world can understand your game


Features:
  1. You don’t need to put the meaning of each word manually. After press Translate Button, translation downloaded from Google.
  2. We are not using Google API. So this package will not effect the size of your build.
  3. Code is Clean you can change it manually.
  4. Arabic support integrated.
  5. This plugin support multiple international languages.
  6. You can use its “Translate Script” in any project.
  7. We are working on it for making it more robust.
  8. Android and IOS Support.
  9. Now you can edit meaning of each word manually.

Documentation:
Unity Version 5.5.1f1 or higher.
There are two Scene in Package
  • ·         Localization Setup ( Auto Localization/Scene)
  • ·         Localization Demo ( Auto Localization/Example)

All we need is Localization Setup Scene for setting up word for which we want to translate.
So Open up Localization Setup Scene (All you need is Internet during these step, once your word translation downloaded you can use it in your game)
Setup:
  1. First check there is Translate Game object in scene ( if not then create empty game object and attach the translate Script to it)
  2. In Canvas there is Progress Bar ( Canvas has a script named : ProgressBarController )
  3. Go to Window/ Localization. Localization window appears:
  4. Set the source Language ( Primary Language in which you are developing your game, Don’t Change it once you have translate word in that language).
  5. Insert “word” in text and select Language.
  6. After typing “word” Press add word Button then the editor ask for 2nd word so on…
  7. After pressing Add word button you cannot change your previous words, if you want to change them then remove them.
  8. At the end press Save-all Button.
  9. Then press Translate button. Editor will play automatically, and progress bar showing percentage of how much progress has been made ( You can see the translation in the Console)
  10. If this time your internet not working then message will be shown that your” Internet not working properly” in the Console.
  11. If your words downloading interrupt by internet in between progress then don’t worry (wait for internet), again go to window/localization and press Save-all and then Translate.
  12. After 100% complete off the play Button, you can switch to Localization Demo Scene.

Demo:
1.    Open Demo Scene (Auto Localization/ Localization Demo)
2.    Create an Empty Game object named it (Language Manager) and put the Language Manger Script on it. (You need to repeat this setup in your main game scene also if you want to use it in your game).
3.    Repeat. After Switching from Localization Setup scene to Demo Scene or YourGameScene you need to repeat step no 2.


4.    Type the word in input Field as I type Language, Select the language “French” (whatever you want). Then press the Get Button Meaning.
5.    You can Look on Testing Script

6.    You need Only one line of code for getting the meaning of your word “LanguageManager.Instance.GetMeaning (“Language”,Languages.English”).
7.    You need to add AutoLocalization namespace in your script for using LanguageManager.

Version:

v: 1.0 

Android Native Plugin

Android Native Plugin Introduction: So here are two versions of this plugin. In Free version you can open gallery and select Image of ...