Skip to content

Unity plugin that outputs errors for null SerializeFields during runtime, with options to allow exceptions, installable via git URL or OpenUPM.

License

Notifications You must be signed in to change notification settings

tanitaka-tech/OptionalSerializeField

Repository files navigation

openupm license

Docs (English, 日本語)

In Unity, when SerializeField is None during scene execution, it will now output an error.

This prevents SerializeField from unintentionally becoming None.

How to allow None

  • Adding the Optional attribute will exclude that SerializeField from error checking.
[SerializeField, Optional] SomeBehaviour _someBehaviour;
  • By specifying namespaces and assembly names in ProjectSettings, MonoBehaviours included in the specification will be excluded from error checking. Screenshot 2024-01-20 at 14 47 43

Installation ☘️

Install via git URL

  1. Open the Package Manager
  2. Press [+▼] button and click Add package from git URL...
  3. Enter the following:

Install via OpenUPM

openupm add com.tanitaka-tech.optional-serialize-field

special thanks 🙏

This library was created with reference to the following library:

About

Unity plugin that outputs errors for null SerializeFields during runtime, with options to allow exceptions, installable via git URL or OpenUPM.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages