Invisible Transparent Button in Unity3D

Today i was working on a project where i required to add the invisible button. I tried different methods like making button transparent, adding the image in the button. But then i came to know about this solution. I think that this is probably the best solution.

Steps to add invisible button in Unity3D

1. Add the Button. (UI -> Button)
2. Edit the height and width of the button according to your fit.
3. Delete the Image(Script) and the text from the button.
4. Create new C# script (Touchable.cs) and add the following code into it:

// Touchable.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
public class Touchable_Editor : Editor
{ public override void OnInspectorGUI(){} }
public class Touchable:Text
{ protected override void Awake() { base.Awake();} }

5. Add Touchable.cs script to the button.


Now you have the invisible button.

Source: UnityForum

Finally Graduated, I am an Engineer now

Hello all,

I have completed the Bachelor of Engineering in Software Engineering from Gandaki College of Engineering and Science (GCES), Lamachaur, Pokhara.

Recently on February 25th 2017, I had the convocation ceremony. The summary of this event can be found on my next blog. “Convocation Ceremony – Pokhara University“.

Graduation Photo

I would like to thank everyone for helping me through out this journey. Especially my Father, Mother and my brother.

This will inspire me to do more in my life for my country and for the world.

Thank You All!

Convert the list of images to PDF file and add watermark in Ubuntu


, , , ,

Converting list of images to PDF in Ubuntu
Let’s use ImageMagick tool. Normally it is installed in Ubuntu. If you need to install it then run:

$ sudo apt-get install imagemagick

Then you can convert it by using:
$ convert image_1.jpg image_2.jpg output.pdf

You can specify any numbers of images but the last argument must be a name of your PDF file along with extension (.pdf).

Adding the watermark in the PDF file
We use Python script for adding watermark to each page in the PDF file. We will be using “PyPDF2” python library.

$ pip install PyPDF2

Make your watermark ready, convert it to PDF file. Make sure that watermark file is of same page size as of your PDF file.

Then run this code by modifying the file names:

import PyPDF2

originalFile = open('inputfile_pdf', 'rb')
pdfReader = PyPDF2.PdfFileReader(originalFile)
pdfWriter = PyPDF2.PdfFileWriter()

for i in range(0, pdfReader.numPages):
    originalfile_page = pdfReader.getPage(i)
    pdfWatermarkReader = PyPDF2.PdfFileReader(open('watermark.pdf', 'rb'))

resultPdfFile = open('watermarked_outputfile.pdf', 'wb')

Fix: ClockworkMod Recovery MD5 mismatch


Hello all, i was trying to restore my backup of the system image which is about 6 months older via ClockworkMod Recovery. But i got a error which says something like:

MD5 mismatch!

Then after searching over the internet i found out the solution to this. Hope this might be useful to you.

Solving the problem

In the backup image folder you will see several files including nandroid.md5. Open this file with text editor such as vim or any of your favorite editor.

Delete the content of the file and make it empty. Optionally if you have any problem editing the file and simply delete this file and make a new file with same name(nandroid.md5) and keep this in the back image folder.

So, by deleting the content of this file i was able to fix the problem. Hope you will be able to solve the problem with this method.

“Constitution of Nepal” Android App


It’s been so great to feel that the Constitution of Nepal has finally arrived. Congratulations to all the Nepalese. May this Constitution brings peace, prosperity and rapid development in the country is the wish of all the Nepalese.

On this occasion with the intention of easy distribution of Constitution and making available of Constitution in the hand of all the people, i have developed an Android app to read the Constitution.

It is available on Google Play

Download Constitution of Nepal.