- Home /
Answer by ScroodgeM · Aug 07, 2012 at 07:28 PM
if this is Transform type, so simple
if (selectedTarget) { ... } 
               this becomes false after object is destroyed
Answer by Maxddualz · Aug 08, 2012 at 10:21 AM
not work for me O.o
if (selectedTarget) {
 }
else { TargetEnemy(); GetComponent().target = selectedTarget; GetComponent().target = selectedTarget; }
whats wrong with that script??
if (selectedTarget) { ...do smthing if object is alive... }
else { ...no object found, do something here too but don't call object... }
 
                 Your answer
 
 
             Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
How to cleanly delete Object with attached Bounding Box Rig (Script)? 0 Answers
c# destroy Gameobject on 0 hp 1 Answer
How to destroy instantiated objects. 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                