Skip to content

Danand/LiteComponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiteComponent

How to install

Add in Packages/manifest.json to dependencies:

"com.danand.litecomponent": "https://github.com/Danand/LiteComponent.git#0.1.0-package-unity"

How to use

Just add attribute LiteComponent to interface-typed field for drawing implementations dropdown and selected implementation's fields in inspector:

[SerializeReference]
[LiteComponent]
public ICustomBehaviour behaviour;

Notice that Unity 2019.3 is required because of using SerializeReference for abstract types serialization.

Mark every behaviour implementation as Serializable:

[Serializable]
public class ICustomBehaviourImpl : ICustomBehaviour { /* ... */ }

About

Lightweight behaviour component for Unity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors