Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CrazyCamel

Pages: [1]
1
thanks for your help.

2
DOTween & DOTween Pro / a gc issue about Tweener.ChangeEndValue.
« on: May 25, 2015, 10:05:50 AM »
hi there
I have a issue about Tweener.ChangeEndValue.
I use this to make camera follows the main character with code like:
if(mMoveTween == null){
mMoveTween = m_Tran.DOMove(m_CameraLocation.position,0.5f).OnKill(()=> mMoveTween = null);
}else if(mMoveTween.IsPlaying()){
mMoveTween.ChangeEndValue(m_CameraLocation.position,true);
}else
{
mMoveTween = m_Tran.DOMove(m_CameraLocation.position,0.5f);
}
the variable "mMoveTween" is the preference i kept in the class.meenwhile i set the recycleAllByDefault be true when init.
DOTween.Init(true, true, DG.Tweening.LogBehaviour.Default);
the question is when I run the game. there always are 20b GC allocations in unity profiler.how dose this happen? I think the mMoveTween should be reused without any gc.
i'm looking forward to your answers , thx.

Pages: [1]