Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.34k stars 351 forks source link

Can't use TextMesh Pro module without first commenting out C# code to remove references #602

Closed Meorge closed 1 year ago

Meorge commented 1 year ago

In one of my projects, I'm using the DOTween Pro module for TextMesh Pro. Since DOTween Pro is a paid product, I've set my .gitignore up to exclude its files from the repository, so that when I clone it on a different computer, I have to redownload DOTween Pro.

There's a pretty major issue with this approach, though. My code references classes in the TMP module, but because the TMP module isn't added as soon as I import DOTween Pro itself, I get compilation errors for unknown types. In order to fix this, I have to go through my scripts and comment out all of the lines that reference those classes, so that the Utility Panel will show up, then enable the TMP module, apply, and uncomment my code again. I luckily only have a few references to the TMP module, but I could see it being really frustrating if there were more of them and/or they were more spread out across a project.

Is there a better way of going about this (so that I wouldn't have to modify my code so I can enable the module, and then undo the modifications) that I'm not seeing? If not, this seems like it would be a very good and important thing to look into fixing.

Demigiant commented 1 year ago

Ahoy!

Even if you have error logs, you are still able to open DOTween's Utility Panel manually (Toosl > Demigiant > DOTween Utility Panel) and run the Setup add the TextMesh Pro module to fix this :)

Alternatively, which would be the best solution, you could make a private instead of public repository, so you can add to it all the paid products you want as long as it never goes public.

Meorge commented 1 year ago

Thanks so much for the quick response! I just tried doing a fresh clone of the project and following your steps. Once DOTween was imported to the project, I had to restart the Editor in order for the Utility Panel to show up, but it worked! :) Must be a bug on Unity's end, then.