Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

itween add null checker

$
0
0
how can i add null to this script to see if a object has been destroyed? public static void Stop(GameObject target, string type){ Component[] tweens = target.GetComponents(typeof(iTween)); foreach (iTween item in tweens){ string targetType = item.type+item.method; targetType=targetType.Substring(0,type.Length); if(targetType.ToLower() == type.ToLower()){ item.Dispose(); } } }

Viewing all articles
Browse latest Browse all 171066

Trending Articles