dotween icon indicating copy to clipboard operation
dotween copied to clipboard

CanvasGroup shortcut not seeing methods

Open leeprobert opened this issue 6 years ago • 8 comments

The DOFade shortcut is not recognised on my instance of CanvasGroup. The error message is: 'CanvasGroup' does not contain a definition for 'DOFade' and the best extension method overload 'ShortcutExtensions.DOFade(Material, float, float)' requires a receiver of type 'Material' I have UI enabled in the utility panel, and am importing the DG.Tweening package.

leeprobert avatar May 10 '19 15:05 leeprobert

Ahoy! Is it possible that something went wrong in the modules initialization? Can you try to restart Unity and see if that still happens, and if it does, can you check the "DOTween/Modules/DOTweenModuleUI.cs" file to be sure that it's define is making it active? On what version of Unity are you?

Cheers, Daniele

Demigiant avatar May 11 '19 10:05 Demigiant

Hi @Demigiant, I have the same issue, but I've noticed that it only happens for code that's with an assembly definition. unity 2019.3.0f6 dotween pro 1.0.244 and also dotween 1.2.420

Cheers :) Brago

IndieConstruction avatar Aug 27 '20 10:08 IndieConstruction

@IndieConstruction cioè scusa volevo dire Bragoooooooooooooooooooooooooooooooooooooooooooooo!!! :)

If you want a custom assembly (so not regular loose script) to be able to read modules stuff you need to create DOTween's ASMDEFs (because assemblies can't read loose scripts), which you can do from DOTween Utility Panel (the button right under Setup) :)

Demigiant avatar Aug 27 '20 11:08 Demigiant

Digggi!!!!! Always the number one!!! I had completely missed this part, it works perfectly ;)

IndieConstruction avatar Aug 28 '20 00:08 IndieConstruction

Big love! :D

Demigiant avatar Aug 28 '20 09:08 Demigiant

I still have the problem

Unity 2022.3 and DOTween 1.2.745 I tried to ASMDEFs from the utility panel, but that did nothing

wendten avatar Dec 03 '23 19:12 wendten

Same here. I Generate the ASMDEFs from Utility Panel in my source project, where i also develop my Package. I Also Generate ASMDEFs in my target project, where i import my package. But always get error CS1929: 'CanvasGroup' does not contain a definition for 'DOFade' and the best extension method overload 'ShortcutExtensions.DOFade(Material, float, float)' requires a receiver of type 'Material'

Unity 2022.3.23f1 and DOTween 1.2.765

valentinwinkelmann avatar Apr 22 '24 16:04 valentinwinkelmann

Had a similar issue today, in case anyone ends up here: both values need the f to pass a float, otherwise the above error will show up unhelpfully. E.g. canvasgroup.DOFade(1f, 1f); Make sure you didn't miss the f.

dasoku avatar Jul 16 '24 09:07 dasoku