Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is created to resolve the dependency issue when DOTween is an optional dependence of a package.
Because DOTween is not a package, a standard package can not directly use DOTween.
A common approach for a standard package to optionally depend on DOTween is:
in ASMDEF of the the package itself -
Assembly References
, addDOTween.dll
because DOTween has no
package.json
, skip theVersion Defines
hereuse marco
DOTWEEN
to optionally execute logic with DoTween:Here
using DG.Tweening;
will failed when DOTween's ASMDEF has not been created yet, which requires user to manually create that.Propose
This PR add
DOTWEEN_ASMDEF
when user created the ASMDEF of DOTween, and a standard package can now optionally depend on DOTween with the same approach, but change:#if DOTWEEN
to
#if DOTWEEN_ASMDEF
This PR is created because the #586 has been pending for two years. This PR is much much more simple than 586. Though it does not directly resolve the package problem of DOTween, but it allows DOTween to be optionally dependent by other packages right away, with much less time to review the changes I've made