- public Texture2D center;
- void Start() {
- ...
- center = (Texture2D) Resources.Load("center", typeof(Texture2D)); // Assigns a texture named "center.png" to a Texture2D(center).
- ...
- }
- void OnGUI() {
- ...
- if (GUI.Button (new Rect (850, 570, 32, 32), new GUIContent(center))) {
- ...
- }
- ...
- }
Dec 12, 2013
[Unity3d] GUI Button Image
[Unity3d] Background Image
You're almost there, with the 2nd camera approach. Here's how to do it:
Voila, this should give you your GUI Texture rendered by your background camera, behind everything else rendered by your main camera. And for any other additional cameras (eg, other camera angles) that you want to use, just repeat the last two steps on them.
Original Text:
|
[android] How to link to google play store app market
1. Search the web and find out URL of your target app.
It will look like this:
http://play.google.com/store/apps/details?id=com.xxx.xxx
2. Insert the source code.
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=com.xxx.xxx"));
startActivity(intent);
It will look like this:
http://play.google.com/store/apps/details?id=com.xxx.xxx
2. Insert the source code.
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=com.xxx.xxx"));
startActivity(intent);
Dec 9, 2013
[MySql] External Connection to MySql
mysql -u root -p
input password
mysql>grant all privileges on *.* to 'root'@'%' identified by 'password';
mysql>flush all privileges;
then restart mysql like : mysqld restart
if it does not work edit mysql.conf (mysql.ini) and restart.
//bind 127.0.0.1 ---> comment this .
input password
mysql>grant all privileges on *.* to 'root'@'%' identified by 'password';
mysql>flush all privileges;
then restart mysql like : mysqld restart
if it does not work edit mysql.conf (mysql.ini) and restart.
//bind 127.0.0.1 ---> comment this .
Dec 4, 2013
[android] How to Get Current Time
long now = System.currentTimeMillis();
Date date = new Date(now);
SimpleDateFormat CurDateFormat = new SimpleDateFormat("yyyy년 MM월 dd일");
SimpleDateFormat CurTimeFormat = new SimpleDateFormat("HH시 mm분");
SimpleDateFormat CurYearFormat = new SimpleDateFormat("yyyy");
SimpleDateFormat CurMonthFormat = new SimpleDateFormat("MM");
SimpleDateFormat CurDayFormat = new SimpleDateFormat("dd");
SimpleDateFormat CurHourFormat = new SimpleDateFormat("HH");
SimpleDateFormat CurMinuteFormat = new SimpleDateFormat("mm");
String strCurDate = CurDateFormat.format(date);
String strCurTime = CurTimeFormat.format(date);
String strCurYear = CurYearFormat.format(date);
String strCurMonth = CurMonthFormat.format(date);
String strCurDay = CurDayFormat.format(date);
String strCurHour = CurHourFormat.format(date);
String strCurMinute = CurMinuteFormat.format(date);
byte string convert in C#
byte[] bStrByte = Encoding.UTF8.GetBytes(str0); // string -> byte
string str1 = Encoding.Default.GetString(bStrByte); // byte -> string
Subscribe to:
Posts (Atom)