umm / unirx_simpleanimation_extensions

UniRx extensions for SimpleAnimation

Repository from Github https://github.comumm/unirx_simpleanimation_extensionsRepository from Github https://github.comumm/unirx_simpleanimation_extensions

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

About

UniRx extensions for SimpleAnimation

License:MIT License


Languages

Language:C# 100.0%