how can i fix a object in a particular place of another mesh or object by click on it

i would like to know how can i fix a object in a particular place of another mesh or object by click on the object which is placed away from that mesh or object

Your need to separate out, programmatically, what it is you need to happen. Something like:

  1. Register mouse click on object
  2. Determine the place the object should move to.
  3. Move the object into place and set rotation.

Then work on each individually. As for step two, I have a GameObject that is my player. Then I parent the mesh to it (with the mesh as the child). Then I parent additional gameobjects for where I want other objects to appear. This way, if I want a missile to appear on a tank, I have an object in the right place tagged "missilespawn", and I can find the transform.position and rotation of that child to spawn the missile at.

Also, if you've rigged your model, you can attach your objects to the bones in the rig, just like if they were independent gameobjects... that's how most people attach guns to the hands of their characters...

place the script in clickable object - in that script while mouse down , place the target object over it by getting the clickable objects position using transform function