dotween icon indicating copy to clipboard operation
dotween copied to clipboard

Type `UnityEngine.Transform' does not contain a member `DOPath'

Open ShadowTM opened this issue 8 years ago • 21 comments

Hi! I using Unity2017.1.0p4 and get a error message

error CS1929: Type UnityEngine.Transform' does not contain a member DOPath' and the best extension method overload DG.Tweening.ShortcutExtensions.DOPath(this UnityEngine.Rigidbody, UnityEngine.Vector3[], float, DG.Tweening.PathType, DG.Tweening.PathMode, int, UnityEngine.Color?)' requires an instance of type UnityEngine.Rigidbody'

Please tell me the problem. Thank you.

ShadowTM avatar Aug 27 '17 18:08 ShadowTM

Hi!

Transform indeed contains a DOPath extension method. Please show me your code.

Cheers, Daniele

Demigiant avatar Aug 27 '17 19:08 Demigiant

Thank for you answer.

actor.transform.DOPath(path, 0.5f).SetEase(Ease.InOutSine).Play();

actor is GameObject path is Vector3[]

ShadowTM avatar Aug 27 '17 19:08 ShadowTM

That code is perfectly alright. Is it possible that you have multiple installations of DOTween in the same project? That would make Unity and VS go crazy in weird ways. Can you verify that, and in case also remove all DOTween folders and reimport it (and re-run DOTween's setup)? Let me know.

Demigiant avatar Aug 27 '17 23:08 Demigiant

I checked no duplicates DOTween folders and any files. I created a new project and imported DOTween. In new Pro, DOPath works perfectly. Obviously this is a problem on my part. I will deal with it further. Thanks for the help

ShadowTM avatar Aug 28 '17 20:08 ShadowTM

I have the same problem... @ShadowTM can you please tell me how you fixed it?

filipinyo avatar Nov 09 '17 09:11 filipinyo

@filipinyo, I had the same problem this morning and got it working - hopefully my process can provide some insight into others who have it.

Bizarrely I was getting this compliation error just on the DOPath method. Any other DOTween methods worked with no issues.

I tried deleting the DOTween and reimporting, both from the GIT repository and from the asset store several times to no avail, even starting a fresh project with nothing but the DOTween example scenes and an additional line of code to call DOPath.

What worked, (I think) was completely deleting DOTween from my project, both the Demigiant folder and the DoTween settings under resources, closing unity, navigating to my Roaming Appdata directory and deleting the full Demigiant unitypackage directory.

I then relaunched Unity, çleared any compilation errors (including this one), downloaded the package from the asset store and did the setup process.

Now it seems to work and everything is peachy. Hope this works for others!

IsometricBacon avatar Nov 11 '17 04:11 IsometricBacon

Thanks for chiming in @IsometricBacon, I hope that's gonna be helpful for everybody. It definitely sounds like a Unity bug, but it's all very weird, since DOPath is just a regular extension method like DOMove and all the rest.

Demigiant avatar Nov 11 '17 10:11 Demigiant

Found the entire problem for me turnout to be incompatibility with QuickCutsceneCreator see:

http://forum.demigiant.com/index.php?topic=153.msg524#msg524

Deleted the quick cut scene asset and the "DOPath" error is gone among other issues caused from QuickCutsceneCreator.

CrandellWS avatar Nov 11 '17 13:11 CrandellWS

Hello, I stumbled upon this problem on my project. I'm using the free version 1.1.710 of the DOTween asset and Unity 2017.1.0f3, .NET framework 4.5.2. The method appears in the autocompletion window, assuming it is detected. I followed all the instructions provided above, but none worked in my case. Even tested in a blank project. Not to avail. The DOMove and other shortcuts work fine.

Did someone got this problem solved through another way ?

Yeppoh avatar May 14 '18 22:05 Yeppoh

I just discovered that all methods using TweenerCore don't work and return this error in my case.

Yeppoh avatar May 14 '18 23:05 Yeppoh

I incorrectly passed List <Vector 3> instead of Vector 3 [] as an argument. Since the error content at that time was also error CS 1929, it took enough time to notice the true mistake.

mado-kanki avatar Aug 20 '18 06:08 mado-kanki

Hello, I have the same problem. I'm using Unity 2018.2.6f1, .NET framework 4.7.1, and I noticed that DOTween versions below 1.2.* are working, but when I tried to install 1.2.055 or 1.2.1355 my project crashed. In my case there is no DOAnchorPos and DOPunchAnchorPos for RectTransform and DOColor for UI.RawImage.

So for me using the 1.1.710 version is a temp fix.

Holmes555 avatar Nov 14 '18 08:11 Holmes555

I'm having this same problem with doPath not finding the Transform, as well. Tried deleting, reinstalling from the asset store and the demigiant website. I'm on pro version.

Hope this can be fixed soon :(

gackt2 avatar Nov 18 '18 00:11 gackt2

Ahoy,

Some possible ideas of what might be causing this (because I know the engine is working correctly, so it must be some usecase—I hope I'm not sounding too pretentious, it's just that I really know it's not an engine problem in this case :P).

  1. You installed DOTween (or parts of it) inside/outside a special Unity folder and your code is inside/outside that special Unity folder, so compilation compiles your code before DOTween's
  2. Are you creating a DLL with your code instead than using loose scripts inside Unity? In that case, the problem is that modules in the new Modules version are not a DLL but loose scripts (so they can be manipulated based on your settings), and you will need to create an asmdef with DOTween's files (see this issue for how). Although in general, and from experience, I would really recommend NOT to create code in DLLs for you project, unless you're making tools :P
  3. You didn't setup the Modules correctly? I don't think this is the problem, but can you check if the right ones for you are activated from DOTween's Utility Panel?

Cheers, Daniele

Demigiant avatar Nov 21 '18 10:11 Demigiant

Hi thanks for the reply!

Just wanted to let you guys know, I was using the wrong values. I simplified the line to this and it works:

_transform.DOPath(_array2, 10, PathType.CatmullRom, PathMode.Full3D).SetEase(Ease.InQuad).SetLoops(-1,LoopType.Restart);

gackt2 avatar Nov 23 '18 05:11 gackt2

Hi guys, my problem was that I was passing as an argument a Transform[] and not a Vector3[]. Making a for loop to pass the positions of my Transform[] to a temporary Vector3[] fixed my issue.

jonasca23 avatar Nov 26 '18 16:11 jonasca23

I also had this error message - my error was that I passed a List<Vector3> as waypoints and not an array Vector3[]. waypoints.toArray() solved the problem for me.

mistermotomax avatar May 05 '20 09:05 mistermotomax

I had a similar issue error (CS1929: 'Transform' does not contain a definition for 'DOMove') and fixed it when I realised I was passing a double for the duration rather than the required float.

(all of my time stuff is based in double or time gets very wonky with high values, eg ~47 days - obviously tweens don't last that long, but some network rooms do, hence using doubles across the board for time).

mattparkins avatar May 21 '20 11:05 mattparkins

@mattparkins I also had same issue and fixed it thanks to you.

ugames-dev avatar Jul 23 '20 00:07 ugames-dev

I had a similiar issue today. RectTransform tweens were missing. I tried everything above and nothing happened. Then I used an ancient solution, I restarted my Mac and it started to work.

HakanYksl avatar Aug 13 '21 08:08 HakanYksl

I had the same problem only with DOPath and DOLocalPath and I resolved it through the following method: 1: Go to the tools tab in Unity 2: Demigiant >>> Dotween Utility Panel 3: Select Setup DOTween option 4: Turn off Physics and Physics 2D Hope this helps

HyperMuhammad avatar Feb 23 '23 20:02 HyperMuhammad