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
[blogcard url="http://google.com"] |
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; | |
public class RTransform : MonoBehaviour { | |
[SerializeField] | |
int offsetMaxX, offsetMinX, offsetMaxY, offsetMinY; | |
// Use this for initialization | |
void Start () { | |
} |
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 System; | |
using System.Reflection; | |
// 省略 | |
void changeComponentField() { | |
string gameObjectName = "GameObject1"; // GameObjectの名前 | |
string componentName = "ReflectionTest"; // GameObject内のComponentの名前 | |
string fieldName = "field1"; // Component内のFieldの名前 | |
string fieldVal = "hello!"; // Fieldに適用する名前 | |
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
class ReflectionTest : MonoBehaviour | |
{ | |
public string field1 = ""; | |
} |
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
// 属性を追加 | |
[AttributeUsage(AttributeTargets.Field)] | |
public class PermitReflectionAttribute : Attribute | |
{ | |
} |
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
class ReflectionTest : MonoBehaviour | |
{ | |
[PermitReflection] | |
public string field1 = ""; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2016-02-21 14:35:40" build="160219"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Shells::cmd}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
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 sphero = require("sphero"); | |
var orb = sphero("COM7"); // 自分の Sphero の ID に置き換える | |
orb.connect(function() { | |
function setSpheroTimeout(fn, time) { | |
setTimeout(function() { | |
orb.ping(function() { | |
fn(); | |
}); | |
}, time); |
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
// 読み込むとき、ES6 ( + browserify) だと便利 | |
import Rx from "rx"; // ES6 modules | |
var images = ["1.png", "2.png", "3.png"]; | |
function loadImages() { | |
return Rx.Observable.create(loadImagesObservable); | |
} | |
function loadImagesObservable(observer) { | |
var index = 0; | |
var isCanceled = false; |
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
// 読み込むとき、ES6 ( + browserify) だと便利 | |
import Rx from "rx"; // ES6 modules | |
var images = ["1.png", "2.png", "3.png"]; | |
function loadImages() { | |
return Rx.Observable.create(loadImagesObservable); | |
} | |
function loadImagesObservable(observer) { | |
var index = 0; | |
var loadImage = (name) => { |