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

umm/unirx_simpleanimation_extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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