Skip to content

Commit

Permalink
Merge pull request #16 from AnnulusGames/v0.1.10
Browse files Browse the repository at this point in the history
v0.1.10
  • Loading branch information
AnnulusGames committed Oct 26, 2023
2 parents f8fd81e + 5ed187d commit 693ab12
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,21 @@ internal void AddTween(Tween tween)
internal void ResizeArray()
{
var length = GetCharCount();
if (length != tweenCharInfo.Length)
var prevLength = tweenCharInfo.Length;
if (length != prevLength)
{
Array.Resize(ref tweenCharInfo, length);

if (length > prevLength)
{
for (int i = prevLength; i < length; i++)
{
tweenCharInfo[i].color = new(tmpText.color.r, tmpText.color.g, tmpText.color.b, tmpText.color.a);
tweenCharInfo[i].rotation = Quaternion.identity;
tweenCharInfo[i].scale = Vector3.one;
tweenCharInfo[i].offset = Vector3.zero;
}
}
}
}

Expand All @@ -317,9 +329,8 @@ internal bool UpdateInternal()

if (!tmpText.gameObject.activeInHierarchy) return true;

ResizeArray();

tmpText.ForceMeshUpdate();
ResizeArray();

var textInfo = tmpText.textInfo;
for (int i = 0; i < tweenCharInfo.Length; i++)
Expand Down
2 changes: 1 addition & 1 deletion MagicTween/Assets/MagicTween/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.annulusgames.magic-tween",
"version": "0.1.9",
"version": "0.1.10",
"displayName": "Magic Tween",
"description": "Extremely fast tween library implemented with Unity ECS",
"unity": "2022.1",
Expand Down
2 changes: 1 addition & 1 deletion MagicTween/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 0.1.9
bundleVersion: 0.1.10
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 693ab12

Please sign in to comment.