UnityのUIをスクリプトから操作する方法

UnityのUI(Pos X/Pos Y/Pos ZやWidth/Height)はRectTransformlocalPositionizeDeltaを使って操作できるようです。

Pos X/Pos Y/Pos Z

// Pos X
GetComponent<RectTransform> ().localPosition.x;

// Pos Y
GetComponent<RectTransform> ().localPosition.y;

// Pos Z
GetComponent<RectTransform> ().localPosition.z;

Width/Height

// Width
GetComponent<RectTransform> ().sizeDelta.x

// Height
GetComponent<RectTransform> ().sizeDelta.y

ただ、そのまま使うとInspectorで表示される値とスクリプトで取得できる値が異なることもあり、取り扱いには注意が必要そうです。親Rect TransformやAnchors等の値が関係しているみたいです。

リンク

Unityの新しいGUI機能(uGUI)で実装されたRect Transformの仕様メモ – お米 is ライス
http://spi8823.hatenablog.com/entry/2014/10/27/024948

Gentoo LinuxでNTFSとexFATを使う手順

Gentoo LinuxでNTFSとexFATを使う手順について

カーネルの準備

File systems  --->
  <*> FUSE (Filesystem in Userspace) support
  DOS/FAT/NT Filesystems  --->
    <*> NTFS file system support
    <*>   NTFS write support

パッケージのインストール

# emerge --ask sys-fs/ntfs3g
# emerge --ask sys-fs/fuse-exfat sys-fs/exfat-utils

/etc/fstabに設定する場合のサンプル

/dev/sdx1 /mnt/ntfs  ntfs       defaults,iocharset=utf8 0 0
/dev/sdx2 /mnt/exfat exfat-fuse defaults,iocharset=utf8 0 0

リンク

NTFS – Gentoo Wiki
https://wiki.gentoo.org/wiki/NTFS

exFAT – Gentoo Wiki
https://wiki.gentoo.org/wiki/ExFAT