dotween
dotween copied to clipboard
DOTween as a package
@Demigiant Please check everything to see if it is working as it should. I have done checks but you know DOTween better than I do.
I have tried to order this PR in several commits and I have changed what is strictly necessary in *.cs files in order not to complicate this PR more. Once this PR is merged, other changes can be made.
I have developed more functionalities:
Package
- Generate the template with the metadata and *.meta files where the assemblies and necessary resources will be copied.
- In the metadata I have put Unity 2020.3 to put a not too recent LTS version.
- In the DOTween.Modules.asmdef file I have added version defines for the different modules.
When we merge this PR, we should be able to install the package as follows temporarily until it is published in OpenUPM:
"com.demigiant.dotween": "https://github.com/Demigiant/dotween.git?path=/Package#v1.2.632-upm"
DOTween and DOTweenEditor Projects
- Convert to dotnet sdk style to modernize them and simplify the *.csproj files.
- Target .NET Standard 2.0 instead of .NET Framework as it was added in 2019+.
- Install the dependency: https://github.com/Rabadash8820/UnityAssemblies. This dependency greatly simplifies and standardizes the coupling to Unity assemblies (UnityEngine.dll and UnityEditor.dll). This also eliminates hardcoded paths to Unity editors.
- I have edited the *.bat file and removed the hardcoded paths.
- I have created *.bat scripts to copy the files to the package folder structure.
- I have detected several warnings in the Unity deprecated properties compile that if the APIs they suggest are in 2019+ they can be replaced without problem. But I haven't touched them.
Asset vs Package
- I have maintained compatibility with "asset mode" and I "think" that I have not created any regression, i.e. the asset works as before.
- I detect if we are in "asset mode" or "package mode".
- In "package mode" it is not possible to manipulate the configurations that have to do with asmdefs for obvious reasons.
CI Workflow
- Through a matrix it runs a job in the last 3 LTS (2019, 2020 and 2021) to prevent breaking changes in Unity APIs.
- Installs and caches (to optimize build time) Unity editors.
- Builds the DOTween and DOTweenEdiitor projects.
- Generates a package artifact for each Unity LTS release previously mentioned.
- Set trigger on push (develop branch).
You can set it as a check when creating PRs so that they must be validated with this worflow in order to be merged.
Other
- I have added instructions on how to build manually to contribute to the project.
Edited (25/07/2022):
Added the following:
- Compatibility with previous versions of Unity: multi framework targeting.
- I have restored the original binaries to simplify the PR as these binaries are regenerated the correct ones when compiling VS projects.
- Now the workflow takes more Unity versions into account and compiles DOTween_LooseScripts if possible (< 2019.2).
- In the DOTween_LooseScripts project, DOTween Pro references are added conditionally since it is not in the repository and does not allow to compile this project due to missing files.
- Convert the bat files to *.targets files so that everything is more integrated with msbuild. The original bat I have left it because I suppose that it is used by the DOTween Pro projects.
In general I see that the repository is a bit disorganized with many files that in theory should be in one place but then they are not (references to DOTween Pro code) and it complicates everything a lot... I think you should have divided the repositories in 2 (free and pro) because without this PR nobody can build anything without spending time to remove references to DOTween Pro and it's quite a mess. As far as possible I'm helping to make at least the free part buildable by anyone and above all, through the workflow.
Such a huge work ! Would love to see this merged, so that this package could be used as a dependency for others.
Thanks for that :)
I would also appreciate if this could be integrated, because this makes it much easier to provide packages which depend on dotween.
@Demigiant please take a look Thank you for your time!
@Demigiant please can we have some traction on this? thanks!!!
@Demigiant I am in the process of migrating all my projects to UPM. As DOTween is a great tweening engine and I would like to continue using it, I would be happy if this pull request is merged.
@Demigiant I am in the process of migrating all my projects to UPM. As DOTween is a great tweening engine and I would like to continue using it, I would be happy if this pull request is merged.
In the meantime, you may be interested in https://github.com/jeffreylanters/unity-tweens. I tried it and it is very similar, but has updates and UPM
Is there any news on whether this will be merged anytime soon?
See https://github.com/Demigiant/dotween/issues/251#issuecomment-1780753609 for latest update from @Demigiant