snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.59k stars 291 forks source link

LeanTween Size New Command #1012

Open breadnone opened 3 years ago

breadnone commented 3 years ago

Description

No commands to handle RectTransform resizing, this is crucial for UIs

What is the current behavior?

We only have LeanTween/Scale command which intended use case was for non-UI stuffs and would not work properly on any UIs in Unity.

What is the new behavior?

New command to resize UIs based on RectTransform's deltaSize. Basically the opposite of LeanTween/Scale command which utilizes localScale of a Transform

Important Notes

Other information

I really wish, all LeanTween commands would have dedicated custom editor, which BaseLeanTweenCommands.cs is lacking. This way it would make new commands based on it would be much tidier.

Edit: I'm against making direct reference to RectTransform, simply bcos we can't get the gameObject that are stored in our local variables