1.0.4 • Published 8 years ago
@umm/singleton_monobehaviour v1.0.4
What?
- 任意の MonoBehaviour に Singleton にアクセス出来るフィールドを提供します
Why?
- シーンを跨いでアクセスしたりするコンポーネントが少なからず存在していたので実装しました
Install
$ npm install github:umm-projects/singleton_monobehaviour.gitUsage
public class Hoge : SingletonMonoBehaviour<Hoge> {
    public string Fuga() {
        return "Fuga!!!";
    }
}
public class Fuga {
    public void Piyo() {
        Debug.Log(Hoge.Instance.Fuga());
    }
}License
Copyright (c) 2017 Tetsuya Mori
Released under the MIT license, see LICENSE.txt