Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Provide [SortingLayerName] attribute for render string field as Popup in inspector

License

Notifications You must be signed in to change notification settings

umm/sortinglayername_attribute

Repository files navigation

What?

  • プルダウンから SortingLayer を選択可能にする string フィールド向けの Attribute を提供します。

Why?

  • 頻繁に必要とする割には、実装がちょっと面倒だったので共通化しました。

Install

With Unity Package Manager

upm add package dev.upm-packages.sortinglayername-attribute

Note: upm command is provided by this repository.

You can also edit Packages/manifest.json directly.

{
  "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"
      ]
    }
  ]
}

Any other else (classical umm style)

$ npm install github:umm/sortinglayername_attribute.git

Usage

using UnityEngine;
using UnityModule;

public class Sample : MonoBehaviour {

    [SortingLayerName]
    public string SortingLayerName;

}
  • string 型の Serializable なフィールドに対して [SortingLayerName] 属性をセットするだけです。

License

Copyright (c) 2017 Tetsuya Mori

Released under the MIT license, see LICENSE.txt

About

Provide [SortingLayerName] attribute for render string field as Popup in inspector

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages