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

Latest commit

 

History

History
45 lines (29 loc) · 880 Bytes

File metadata and controls

45 lines (29 loc) · 880 Bytes

UniRx SimpleAnimation extensions

What

Requirement

  • Unity 2018.1
  • .NET 4.x / C# 6.0

Install

yarn add "umm/unirx_simpleanimation_extensions#^1.0.0"

Usage

Observe Play, Stop animation

GetComponent<SimpleAnimation>()
    .OnPlayAsObservable("ClipName")
    .Subscribe(_ => Debug.Log("ClipName played!"));

GetComponent<SimpleAnimation>()
    .OnStopAsObservable("ClipName")
    .Subscribe(_ => Debug.Log("ClipName stopped!"));

Wait for animation to end while playing animation

GetComponent<SimpleAnimation>()
    .PlayAsObservable("ClipName")
    .Subscribe(_ => Debug.Log("ClipName played!"));

License

Copyright (c) 2018 Tetsuya Mori

Released under the MIT license, see LICENSE.txt