Skip to content

Commit 3ae806e

Browse files
committed
fix null reference in Anim_GlowAtoms
1 parent f3f915a commit 3ae806e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Assets/Scripts/Animations/Anims/Anim_GlowAtoms.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public override void Play()
2424

2525
foreach (Atom atom in structure.structureBuilder.crystal.atoms.Values)
2626
{
27+
if(atom.drawnObject == null) continue;
28+
2729
Anim_GlowPulse anim = atom.drawnObject.AddComponent<Anim_GlowPulse>() as Anim_GlowPulse;
2830
anim.emissionColor = new Color(1,1,0);
2931
anim.maxIntensity = 0.4f;

0 commit comments

Comments
 (0)