- Home /
This question was
closed Aug 01, 2018 at 07:20 AM by
tormentoarmagedoom for the following reason:
The question is answered, right answer was accepted
Question by
hassonhamo3 · Aug 01, 2018 at 04:16 AM ·
instantiateproblem during runtime
Instantiate()creates two objects?
i'm trying to instantiate only one thing but it instantiates two < i don't know why .
التقاط-2018-08-01-07-11-35-585.png
(24.8 kB)
Comment
Best Answer
Answer by khooroko · Aug 01, 2018 at 05:13 AM
DamageEnemy() might have been called twice somewhere. Perhaps it is called by OnTriggerEnter() or OnCollisionEnter() by two colliding objects, or one of the two objects has multiple colliders. Is it used in any Update() in any script?
thanks for replying , i figured it out ,in unity the boxcollider of the trigger was a bit big i made it smaller and it works .