Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOTween as a package #586

Open
wants to merge 33 commits into
base: develop
Choose a base branch
from

Conversation

bdovaz
Copy link

@bdovaz bdovaz commented Jul 21, 2022

@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.

bdovaz added 12 commits July 21, 2022 23:20
- Install Unity3D NuGet package to simplify Unity assembly dependencies
- Install Unity3D NuGet package to simplify Unity assembly dependencies
- Add Unity editor path parameter
- Handle *.tmp files existence before deleting
- Better log messages
They are redundant since they are generated when compiling the 2 projects (DOTween and DOTweenEditor).
- Fix texture loading in both asset and package mode
- Only allow manipulating asmdef on asset mode
@Eyap53
Copy link

Eyap53 commented Aug 9, 2022

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 :)

@tgoessler
Copy link

I would also appreciate if this could be integrated, because this makes it much easier to provide packages which depend on dotween.

@simonpham
Copy link

@Demigiant please take a look
Thank you for your time!

@4rcant
Copy link

4rcant commented Jul 7, 2023

@Demigiant please can we have some traction on this? thanks!!!

@glowdragon
Copy link

@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.

@Eyap53
Copy link

Eyap53 commented Nov 17, 2023

@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

@gamebuildio
Copy link

Is there any news on whether this will be merged anytime soon?

@Eyap53
Copy link

Eyap53 commented Jan 5, 2024

See #251 (comment) for latest update from @Demigiant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants