- Awake(), Start() の実行完了を待つためのストリームを提供します。
- Unity 2018.2
- UniRx
upm add package dev.upm-packages.unirx-observablelifecyclemonobehaviourNote: upm command is provided by this repository.
You can also edit Packages/manifest.json directly.
npm install github:umm/unirx_observablelifecyclemonobehaviour- 実行順待ちを行うためのクラスを継承します。
- 待つ側も待たれる側も
ObservableLifecycleMonoBehaviourを継承します。
- 下記4つのリストを
[SerializeField]として公開しています。Pre Awake GameObject ListPre Awake Component ListPre Start GameObject ListPre Start Component List
- GameObject を設定した場合、当該 GameObject にアタッチされている全ての
ObservableLifecycleMonoBehaviourを待ちます。
- 対応するコールバックメソッドに、本来 Awake() や Start() で行いたかった処理を実装します。
Awake():void OnAwake()Start():void OnStart()
Copyright (c) 2018 Tetsuya Mori
Released under the MIT license, see LICENSE.txt
{ "dependencies": { // (snip) "dev.upm-packages.unirx-observablelifecyclemonobehaviour": "[latest version]", // (snip) }, "scopedRegistries": [ { "name": "Unofficial Unity Package Manager Registry", "url": "https://upm-packages.dev", "scopes": [ "dev.upm-packages" ] } ] }