Optional functionality in packages

Hi, i have a package, that is supposed to have some additional functionality if the user chooses to use the Addressables System over the standard way of referencing objects directly.

Whats the best way to implement such a feature? Adding the Addressables Package as a dependency will force it upon users that do not use it and i dont like that idea.

Your package’s assembly definition(s) can use the version defines feature in order to introduce a define symbol you can check. See here: Unity - Manual: Assembly definitions

1 Like

Thanks that was exactly what i needed.