Digital metronome ranging from10 to 480 bpm
Wednesday, October 22, 2014
Sunday, October 12, 2014
Friday, April 18, 2014
Tuesday, April 8, 2014
Thursday, April 3, 2014
Wednesday, April 2, 2014
Monday, March 31, 2014
URI and URL reference pages
Uniform Resource Locators (URL) - IETF RFC 1738
Uniform Resource Identifier (URI) : Generic Syntax - IETF RFC 3986
Guidelines and Registration Procedures for new URI Schemes - IETF RFC 4395
Uniform Resource Identifier (URI) Schemes - IANA registries (based on IETF RFC 4395)
Wikipedia URL reference
Wikipedia URI reference
Wikipedia URI Scheme reference
Uniform Resource Identifier (URI) : Generic Syntax - IETF RFC 3986
Guidelines and Registration Procedures for new URI Schemes - IETF RFC 4395
Uniform Resource Identifier (URI) Schemes - IANA registries (based on IETF RFC 4395)
Wikipedia URL reference
Wikipedia URI reference
Wikipedia URI Scheme reference
Saturday, March 29, 2014
Sunday, March 23, 2014
Tuesday, March 11, 2014
Android reference pages
Friday, November 15, 2013
UNITY3D Quit application script
/* Copyright 2013, Aleksander Hristov, boxcollider@gmail.com . This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ using UnityEngine; using System.Collections; //Class responsible for quitting application. Shows button in the top right corner of a screen. //Attach this script to an empty game object in scene. public class AppQuitter : MonoBehaviour { float screenScale = 0.15f; int buttonWidth; int buttonHeight; void Start () { buttonWidth = (int)(Screen.width * screenScale); buttonHeight = (int)(Screen.height * screenScale); } void OnGUI () { if (GUI.Button (new Rect (Screen.width - buttonWidth, 0, buttonWidth, buttonHeight), "Quit")) { Application.Quit (); } } }
Friday, November 1, 2013
Thursday, October 31, 2013
UNITY3D PlayerPrefs viewer window
/* Copyright 2013, Aleksander Hristov, boxcollider@gmail.com . This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ using UnityEngine; using System; using Microsoft.Win32; using UnityEditor; //Class responsible for viewing PlayerPrefs in Editor Window . //Place this script in folder named "Editor". //Click on menu bar on the top PlayerPrefs->Viewer public class PlayerPrefsViewer : EditorWindow { string[] appKeyNames; string[] appValueData; int prefsElementNumber=0; Vector2 scrollInitialPosition =Vector2.zero; [MenuItem ("PlayerPrefs/Viewer")] static void Starti () { EditorWindow.GetWindow<PlayerPrefsViewer>("PlayerPrefs"); } void OnEnable(){ getPlayerPrefs(); } void getPlayerPrefs(){ RegistryKey appProductName = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey(PlayerSettings.companyName).OpenSubKey(PlayerSettings.productName,true); if(appProductName==null){ return; } prefsElementNumber=appProductName.ValueCount; if(appProductName.ValueCount<=0){ return; } appKeyNames=new string[ prefsElementNumber]; appValueData=new string[ prefsElementNumber]; appKeyNames=appProductName.GetValueNames(); for(int i=0;i<prefsElementNumber;i++){ appKeyNames[i] = fromRegistryKeyToUnityKey(appKeyNames[i]); appValueData[i]= fromRegistryValueToUnityValue(appKeyNames[i]); } } void OnGUI () { if(prefsElementNumber<=0){ EditorGUILayout.BeginVertical(); showRefreshButton(); EditorGUILayout.LabelField("PLAYERPREFS EMPTY"); EditorGUILayout.EndVertical(); return; } EditorGUILayout.BeginVertical(GUILayout.ExpandHeight(true)); scrollInitialPosition=EditorGUILayout.BeginScrollView(scrollInitialPosition,false,true); showRefreshButton(); EditorGUILayout.Space(); for(int i=0;i<prefsElementNumber;i++){ EditorGUILayout.BeginHorizontal(); EditorGUILayout.SelectableLabel(appKeyNames[i]); EditorGUILayout.SelectableLabel(appValueData[i]); GUI.backgroundColor=Color.red; if(GUILayout.Button("delete preference")){ PlayerPrefs.DeleteKey(appKeyNames[i]); getPlayerPrefs(); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.Space(); GUI.backgroundColor=Color.blue; if(GUILayout.Button("Delete all preferences",GUILayout.ExpandWidth(true))){ PlayerPrefs.DeleteAll(); prefsElementNumber=0; getPlayerPrefs(); } EditorGUILayout.EndScrollView(); EditorGUILayout.EndVertical(); } void showRefreshButton(){ GUI.backgroundColor=Color.green; if(GUILayout.Button("Refresh player preferences",GUILayout.ExpandWidth(true))){ getPlayerPrefs(); } } string fromRegistryValueToUnityValue(string prefKey){ if(PlayerPrefs.GetInt(prefKey,int.MinValue)!=int.MinValue){ return PlayerPrefs.GetInt(prefKey).ToString(); } if(PlayerPrefs.GetFloat(prefKey,float.MinValue)!=float.MinValue){ return PlayerPrefs.GetFloat(prefKey).ToString(); } return PlayerPrefs.GetString(prefKey); } string fromRegistryKeyToUnityKey(string key){ return key.Remove(key.LastIndexOf("_")); } }
Subscribe to:
Posts (Atom)









