This commit is contained in:
parent
66d6a79fd8
commit
be6067fdac
|
@ -142,13 +142,14 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
|
|||
/// <param name="deviceID"></param>
|
||||
public void DistroyUI(string deviceID)
|
||||
{
|
||||
if(deviceID.Length < 10) return;
|
||||
RadioAngleView radioAngleView = radioAngleViews.Find(x => x.deviceID == deviceID);
|
||||
if (radioAngleView)
|
||||
{
|
||||
Destroy(radioAngleView.gameObject);
|
||||
for(int i= 0; i < radioAngleViews.Count; i++)
|
||||
{
|
||||
if (radioAngleView == null)
|
||||
if (radioAngleViews[i] == null)
|
||||
{
|
||||
radioAngleViews.RemoveAt(i);
|
||||
}
|
||||
|
@ -160,7 +161,7 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
|
|||
Destroy(renderTexture);
|
||||
for (int i = 0; i < renderTextures.Count; i++)
|
||||
{
|
||||
if (renderTextures == null)
|
||||
if (renderTextures[i] == null)
|
||||
{
|
||||
renderTextures.RemoveAt(i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue