Skip to content

Serializes reference to interface implementation

License

MIT, Unknown licenses found

Licenses found

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

dythervin/unity.serialized-reference

Repository files navigation

Unity serialized reference

Serializes reference to interface implementation

    public interface IDemoInterface
    {
        void LogName();
    }
    
    
    public class RefDemo : MonoBehaviour
    {
        [SerializeField] private Ref<IDemoInterface> demoInterface;

        private void Awake()
        {
            //Usage
            demoInterface.Value.LogName();
        }
    }

Example

About

Serializes reference to interface implementation

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