Skip to content

Simple and fast Update, FixedUpdate, LateUpdate callbacks alternative, based on PlayerLoop API

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

ArturBerk/unity-loop-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-loop-system

Simple and fast Update, FixedUpdate, LateUpdate callbacks alternative, based on PlayerLoop API

Simple usage

Inherit LoopBehaviour and implement IUpdateLoopElement or IFixedUpdateLoopElement or ILateUpdateLoopElement

class Looped : LoopBehaviour, IUpdateLoopElement, IFixedUpdateLoopElement, ILateUpdateLoopElement {
    
    public void OnUpdate() {
        // Update stuff
    }
    
    public void OnFixedUpdate() {
        // FixedUpdate stuff
    }
    
    public void OnLateUpdate() {
        // LateUpdate stuff
    }
    
}

Advanced usage

class Looped : MonoBehaviour {

    private Disposables subscription;

    private void OnEnable() {
        subscription += Loops.Update.Start(OnUpdate);
    }
    
    private void OnDisable() {
        subscription.Dispose();
    }
    
    private void OnUpdate() {
        // Update stuff
    }
}

About

Simple and fast Update, FixedUpdate, LateUpdate callbacks alternative, based on PlayerLoop API

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages