This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#note-vignette { | |
position: absolute; | |
right: 0; | |
top: 0; | |
min-width: 100%; | |
min-height: 100%; | |
width: auto; | |
height: auto; | |
z-index: -100; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
key down control | |
keystroke (ASCII character 28) | |
key up control | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[applescript] | |
tell application "System Events" | |
key down control | |
keystroke (ASCII character 29) | |
key up control | |
end tell | |
[/applescript] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# の例 | |
// プロジェクト ウィンドウの選択されたオブジェクトからアセットバンドルを作成 | |
// コンパイルした後は "Menu" -> "Assets" へ移動して選択肢から一つを選択して | |
// アセットバンドルをビルド | |
using UnityEngine; | |
using UnityEditor; | |
public class ExportAssetBundles | |
{ | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function func1(b) { | |
func2(); | |
console.log(b); // IEではfalse | |
} | |
function func2(fn) { | |
arguments.callee.caller.arguments[0] = false; // 破壊した! | |
} | |
func1(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var global = this; | |
(function (b) { | |
if (b) { | |
console.log(global === this, '1'); // true | |
arguments.callee(); | |
return; | |
} | |
console.log(this[0]); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPageSize() { | |
var xScroll, yScroll; | |
if (window.innerHeight && window.scrollMaxY) { | |
xScroll = window.innerWidth + window.scrollMaxX; | |
yScroll = window.innerHeight + window.scrollMaxY; | |
} else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac | |
xScroll = document.body.scrollWidth; | |
yScroll = document.body.scrollHeight; | |
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari | |
xScroll = document.body.offsetWidth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ua = navigator.userAgent.toLowerCase(); | |
$.ua = { | |
isWindows: /windows/.test(ua), // Windows | |
isMac: /macintosh/.test(ua), // Mac | |
isIE: /msie (\d+)/.test(ua), // IE | |
isIE6: /msie (\d+)/.test(ua) && RegExp.$1 == 6, // IE6 | |
isIE7: /msie (\d+)/.test(ua) && RegExp.$1 == 7, // IE7 | |
isLtIE9: /msie (\d+)/.test(ua) && RegExp.$1 < 9, // IE9未満 | |
isFirefox: /firefox/.test(ua), // Firefox | |
isWebKit: /applewebkit/.test(ua), // WebKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class DetectLeaks : MonoBehaviour | |
{ | |
void OnGUI () | |
{ | |
GUI.color = Color.black; | |
GUILayout.BeginArea (new Rect (10, 80, 400, 800)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void DestroyObject () | |
{ | |
foreach (Transform t in transform) { | |
Destroy (t.gameObject.renderer.material); | |
Destroy (t.gameObject); | |
} | |
Destroy (gameObject.renderer.material); | |
Destroy (gameObject); | |
} |
OlderNewer