I am very new to unity but not to C#.
I am working in Unity 2D
I made this prefab called LongLane. Its basically a collection of sprites of road, put together into a Gameobject. Now I wanted objects to spawn on the road when I ONLY click on the road, I can spawn the object on the road but they spawn regardless of where I click. I have written some code but they aren't clear and readable.
So how do I make a script work only when clicked on that specific prefab