https://github.com/anchan828/componentorderattribute
https://github.com/anchan828/componentorderattribute
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anchan828/componentorderattribute
- Owner: anchan828
- License: mit
- Created: 2014-05-03T17:22:24.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-03T18:27:04.000Z (about 11 years ago)
- Last Synced: 2025-01-07T17:42:52.635Z (6 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」をコードで自動管理

## ComponentOrderAttribute
### ComponentOrderAttribute(uint order)
指定した順番通りに並び替える。
**ただしTransformは必ず一番上でなければいけない。**
```
using UnityEngine;
using System.Collections;[ComponentOrder(1)]
public class Order1 : MonoBehaviour
{
}
```
### ComponentOrderAttribute(Type type)
指定したTypeの直下に移動する
```
using UnityEngine;
using System.Collections;[ComponentOrder(typeof(Rigidbody))]
public class OrderRigidbody : MonoBehaviour
{
}
```