- プルダウンから SortingLayer を選択可能にする string フィールド向けの Attribute を提供します。
- 頻繁に必要とする割には、実装がちょっと面倒だったので共通化しました。
upm add package dev.upm-packages.sortinglayername-attributeNote: upm command is provided by this repository.
You can also edit Packages/manifest.json directly.
$ npm install github:umm/sortinglayername_attribute.gitusing UnityEngine;
using UnityModule;
public class Sample : MonoBehaviour {
[SortingLayerName]
public string SortingLayerName;
}- string 型の Serializable なフィールドに対して
[SortingLayerName]属性をセットするだけです。
Copyright (c) 2017 Tetsuya Mori
Released under the MIT license, see LICENSE.txt
{ "dependencies": { // (snip) "dev.upm-packages.sortinglayername-attribute": "[latest version]", // (snip) }, "scopedRegistries": [ { "name": "Unofficial Unity Package Manager Registry", "url": "https://upm-packages.dev", "scopes": [ "dev.upm-packages" ] } ] }