{"id":24044456,"url":"https://github.com/nyanheavy/uitweensize","last_synced_at":"2025-07-15T22:10:34.397Z","repository":{"id":269312026,"uuid":"907029150","full_name":"NyanHeavy/UITweenSize","owner":"NyanHeavy","description":"A size control add-on for UITween","archived":false,"fork":false,"pushed_at":"2025-01-14T02:34:06.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T08:46:42.220Z","etag":null,"topics":["cs","csharp","uitween","unity","unity-ui","unity3d"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NyanHeavy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-22T16:03:56.000Z","updated_at":"2025-01-14T02:34:10.000Z","dependencies_parsed_at":"2024-12-22T17:18:44.369Z","dependency_job_id":"42a77456-751a-455d-8d51-0efea687312c","html_url":"https://github.com/NyanHeavy/UITweenSize","commit_stats":null,"previous_names":["nyanheavy/easytweensize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NyanHeavy/UITweenSize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FUITweenSize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FUITweenSize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FUITweenSize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FUITweenSize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NyanHeavy","download_url":"https://codeload.github.com/NyanHeavy/UITweenSize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FUITweenSize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265464256,"owners_count":23770316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cs","csharp","uitween","unity","unity-ui","unity3d"],"created_at":"2025-01-08T23:31:10.768Z","updated_at":"2025-07-15T22:10:34.364Z","avatar_url":"https://github.com/NyanHeavy.png","language":null,"readme":"# UITweenSize\nA size control add-on for UITween\n\n🚧 **Requires UITween** 🚧 \\\nYou can get it free [here](https://assetstore.unity.com/packages/tools/animation/ui-tween-38583) in the official unity store\n\nGoal\n----\nThis repository aims to add the possibility to animate the size of the object instead of the scale as default.\n![image](https://github.com/user-attachments/assets/a1988634-1d8f-4c91-921e-b552cde68fe3)\n\nDisclaimer\n----\nUITweenSize is not affiliated with, supported or endorsed by the [UITween](https://assetstore.unity.com/packages/tools/animation/ui-tween-38583) asset by [Adi Zhavo](https://assetstore.unity.com/publishers/13979)\n\nUse\n----\nAfter importing the asset, modify the following scripts:\n\n**EasyTween.cs**\n----\n\u003e Add line 82\n```csharp\npublic void SetAnimationSize(Vector3 StartSize, Vector3 EndSize, AnimationCurve EntryTween, AnimationCurve ExitTween)\n{\n    currentAnimationGoing.SetAnimationSize(StartSize, EndSize, EntryTween, ExitTween);\n}\n```\n**EditorUITween.cs**\n----\n\u003e Add line 22\n```csharp\nprivate bool sizeEnabled;\n```\n\u003e Add line 57\n```csharp\nEditorSize();\n```\n\u003e Modify line 83\n```csharp\nif (positionEnabled || rotationEnabled || scaleEnabled || sizeEnabled || tweenScript.animationParts.FadePropetiesAnim.IsFadeEnabled()) ...\n```\n\u003e Modify line 93\n```csharp\nif (positionEnabled || rotationEnabled || scaleEnabled || sizeEnabled) ...\n```\n\u003e Modify line 109\n```csharp\nif (positionEnabled || rotationEnabled || scaleEnabled || sizeEnabled || tweenScript.animationParts.FadePropetiesAnim.IsFadeEnabled()) ...\n```\n\u003e Add line 128\n```csharp\ntweenScript.animationParts.SizePropetiesAnim.StartSize = selectedTransform.sizeDelta;\n```\n\u003e Add line 138\n```csharp\ntweenScript.animationParts.SizePropetiesAnim.EndSize = selectedTransform.sizeDelta;\n```\n\u003e Add line 154\n```csharp\nif (tweenScript.animationParts.SizePropetiesAnim.IsSizeEnabled())\n        selectedTransform.sizeDelta = tweenScript.animationParts.SizePropetiesAnim.StartSize;\n```\n\u003e Add line 178\n```csharp\nif (tweenScript.animationParts.SizePropetiesAnim.IsSizeEnabled())\n        selectedTransform.sizeDelta = tweenScript.animationParts.SizePropetiesAnim.EndSize;\n```\n\u003e Add line 304\n```csharp\nvoid EditorSize()\n{\n    tweenScript.animationParts.SizePropetiesAnim.SetSizeEnable(EditorGUILayout.BeginToggleGroup(\"Size Animation\",\n    tweenScript.animationParts.SizePropetiesAnim.IsSizeEnabled()));\n    sizeEnabled = tweenScript.animationParts.SizePropetiesAnim.IsSizeEnabled();\n\n    if (sizeEnabled)\n    {\n        tweenScript.animationParts.SizePropetiesAnim.StartSize = EditorGUILayout.Vector3Field(\"Start Size\", tweenScript.animationParts.SizePropetiesAnim.StartSize);\n        tweenScript.animationParts.SizePropetiesAnim.EndSize = EditorGUILayout.Vector3Field(\"End Size\", tweenScript.animationParts.SizePropetiesAnim.EndSize);\n        EditorGUILayout.BeginHorizontal();\n\n        if (tweenScript.animationParts.SizePropetiesAnim.TweenCurveEnterSize == null)\n        {\n            tweenScript.animationParts.SizePropetiesAnim.TweenCurveEnterSize = new AnimationCurve();\n        }\n        if (tweenScript.animationParts.SizePropetiesAnim.TweenCurveExitSize == null)\n        {\n            tweenScript.animationParts.SizePropetiesAnim.TweenCurveExitSize = new AnimationCurve();\n        }\n\n        tweenScript.animationParts.SizePropetiesAnim.TweenCurveEnterSize = EditorGUILayout.CurveField(\"Start Tween Size\",\n            tweenScript.animationParts.ScalePropetiesAnim.TweenCurveEnterScale);\n\n        EditorGUILayout.Space();\n\n        tweenScript.animationParts.SizePropetiesAnim.TweenCurveExitSize = EditorGUILayout.CurveField(\"Exit Tween Size\",\n            tweenScript.animationParts.SizePropetiesAnim.TweenCurveExitSize);\n\n        EditorGUILayout.EndHorizontal();\n        EditorGUILayout.Space();\n    }\n    EditorGUILayout.EndToggleGroup();\n}\n```\n**UITween.cs**\n----\n\u003e Add line 64\n```csharp\nif (animationPart.SizePropetiesAnim.IsSizeEnabled())\n{\n    SizeAnimation(rectTransform, percentage);\n}\n```\n\u003e Add line 147\n```csharp\nif (animationPart.SizePropetiesAnim.IsSizeEnabled())\n{\n    SetCurrentAnimSize(animationPart.SizePropetiesAnim.TweenCurveEnterSize,\n        animationPart.SizePropetiesAnim.StartSize,\n        animationPart.SizePropetiesAnim.EndSize);\n}\n```\n\u003e Add line 200\n```csharp\nif (animationPart.SizePropetiesAnim.IsSizeEnabled())\n{\n    SetCurrentAnimSize(animationPart.SizePropetiesAnim.TweenCurveExitSize,\n        animationPart.SizePropetiesAnim.EndSize,\n        animationPart.SizePropetiesAnim.StartSize);\n}\n```\n\u003e Add line 230\n```csharp\npublic void SetAnimationSize(Vector2 StartSize, Vector2 EndSize, AnimationCurve EntryTween, AnimationCurve ExitTween)\n{\n    animationPart.SizePropetiesAnim.StartSize = StartSize;\n    animationPart.SizePropetiesAnim.SetSizeEnable(true);\n    animationPart.SizePropetiesAnim.EndSize = EndSize;\n    animationPart.SizePropetiesAnim.SetAnimationsCurve(EntryTween, ExitTween);\n}\n```\n\u003e Add line 303\n```csharp\n#region SizeAnim\n\nprivate AnimationCurve currentAnimationCurveSize;\nprivate Vector3 currentStartSize;\nprivate Vector3 currentEndSize;\n\npublic void SetCurrentAnimSize(AnimationCurve currentAnimationCurveSize, Vector3 currentStartSize, Vector3 currentEndSize)\n{\n    this.currentAnimationCurveSize = currentAnimationCurveSize;\n    this.currentStartSize = currentStartSize;\n    this.currentEndSize = currentEndSize;\n}\n\npublic void SizeAnimation(RectTransform _rectTransform, float _counterTween)\n{\n    float evaluatedValue = currentAnimationCurveSize.Evaluate(_counterTween);\n    Vector3 valueAdded = (currentEndSize - currentStartSize) * evaluatedValue;\n    _rectTransform.sizeDelta = currentStartSize + valueAdded;\n}\n\n#endregion\n```\n\u003e Add line 521\n```csharp\n[System.Serializable]\npublic class SizePropetiesAnim\n{\n    #region  SizeEditor\n\n    [SerializeField]\n    [HideInInspector]\n    private bool sizeEnabled;\n\n    public void SetSizeEnable(bool enabled)\n    {\n        sizeEnabled = enabled;\n    }\n\n    public bool IsSizeEnabled()\n    {\n        return sizeEnabled;\n    }\n\n    [HideInInspector]\n    public AnimationCurve TweenCurveEnterSize;\n    [HideInInspector]\n    public AnimationCurve TweenCurveExitSize;\n    [HideInInspector]\n    public Vector3 StartSize;\n    [HideInInspector]\n    public Vector3 EndSize;\n\n    public void SetAnimationsCurve(AnimationCurve EntryTween, AnimationCurve ExitTween)\n    {\n        TweenCurveEnterSize = EntryTween;\n        TweenCurveExitSize = ExitTween;\n    }\n\n  #endregion\n}\n```\n\u003e Add line 693\n```csharp\n#region SizeEditor\n\n[HideInInspector]\npublic SizePropetiesAnim SizePropetiesAnim = new SizePropetiesAnim();\n\n#endregion\n```\n\nLicense\n----\n**UITweenSize** is available under the **MIT** license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanheavy%2Fuitweensize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyanheavy%2Fuitweensize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanheavy%2Fuitweensize/lists"}