Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anchan828/componentorderattribute
https://github.com/anchan828/componentorderattribute
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anchan828/componentorderattribute
- Owner: anchan828
- License: mit
- Created: 2014-05-03T17:22:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-03T18:27:04.000Z (over 10 years ago)
- Last Synced: 2024-11-10T13:15:59.002Z (2 months ago)
- Language: C#
- Size: 148 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ComponentOrderAttribute
=======================コンポーネントの「Move Up」「Move Down」をコードで自動管理
![](https://dl.dropboxusercontent.com/u/153254465/screenshot/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%202014-05-04%203.10.50.png)
## ComponentOrderAttribute
### ComponentOrderAttribute(uint order)
指定した順番通りに並び替える。
**ただしTransformは必ず一番上でなければいけない。**
```
using UnityEngine;
using System.Collections;[ComponentOrder(1)]
public class Order1 : MonoBehaviour
{
}
```![](https://dl.dropboxusercontent.com/u/153254465/screenshot/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%202014-05-04%203.15.42.png)
### ComponentOrderAttribute(Type type)
指定したTypeの直下に移動する
```
using UnityEngine;
using System.Collections;[ComponentOrder(typeof(Rigidbody))]
public class OrderRigidbody : MonoBehaviour
{
}
```![](https://dl.dropboxusercontent.com/u/153254465/screenshot/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%202014-05-04%203.16.06.png)