The code I'm using to spawn my object at the position of whatever object the script is attached to seems to not spawn it on the object with the script? My theory is maybe the animator which has an animation that I'm using for an arcade style scoring when the player gets a point is interfering with the code? I say this because every time the object spawns it spawns at the location wherever I made the animation at in the scene?
This code is attached to the game object where I want my object with the animation to spawn, and this code is inside of an OnMouseDown function
Instantiate(doubleScoreUp, Vector2(gameObject.transform.position.x, gameObject.transform.position.y), Quaternion.identity);
↧