This is going to be a small tutorial on how I hack away at Unity 3d.
Before reading this I must say that there are many ways to skin a cat. Meaning that I am sure that there are other ways of doing this but , that being said this is how I do it.
Things that you are going to need
This is the C++ /qt / Awesome IDE that I will be using for this tutorial. You can install it via sotware center or
Next we are going to need all of Unity's and Nux's dependency's
sudo apt-get install qtcreator
It is imorant that I mention that I am going to be building this out of the directory
sudo apt-get build-dep unity && sudo apt-get build-dep nux
Next we need The source code for Unity its self there are a couple of ways of doing this. I just say gather with apt
make sure you are still located at ~/Desktop
Once that is downloaded you should get a folder That is like this.
apt-get source unity
Now lets make are build dir so in terminal
make sure that it is the same name so if you source code of unity is
make sure that it is
Now it is time too open qtcreator
Once qtcreator is open go to
File-->Open FIle or Project
You should get a screen that looks like this
Make sure that you add the -build on at the end if it is not there already. Then press Next
Next you will get the Cmake options for now sense we are going to be building to are unity-6.2.0+bzr2635ubuntu0+762-build. we do not have to add any arguments. So just press Run Cmake.
after cmake runs just press the Finish button.
If you are getting errors make sure that you ran the build-deps above.
All right Now it is time to start Hacking away at unity.
for purposes of this tutorial I am only going to get into changing a icon size at the bottom of the dash.(your lens icons)
to do this we go to dash-->LensBarIcon.cpp
Lines 33 and 34 might look like this.
Lets make them look like this
const int FOCUS_OVERLAY_HEIGHT = 44;
const int FOCUS_OVERLAY_WIDTH = 60;
then go down to line 41 it should look like this
const int FOCUS_OVERLAY_HEIGHT = 64;
const int FOCUS_OVERLAY_WIDTH = 64;
Lets change that to
: IconTexture(icon_hint, 24)
: IconTexture(icon_hint, 48)
Now lets save are work. (ctrl+s) or go to File->Save
Now this next part is only included with Unity 6.2 and up.
we go to the thing that looks like a monitor that is above the green arrow then we set are running point to be
then we press the run button or press ctrl+r and we wait for it to build. Once it is build it will launch Unity-Standalone
Now that you have previewed your changes you can go back to qtcreator and stop it from Running
Once you like whatt you got and you want to replace the stock Unity with what you have just built
remove old unity.
and back in qtcreator
sudo apt-get remove unity
Go to Build-->Run Cmake and this time in the option's add
and Click Run Cmake. after that runs. It is now Build your unity .
press ctrl+b and it will build your unity.
then in the terminal go to
reboot and enjoy your new Unity. Hope you enjoyed reading this.