3d Compas for a Space Simulation

Hello Comunity,
for a Space Game, I want a 2d Pictire in my view to see where to fly to see the target.
My strategiy:
-Get a angle from camera to target call it: camToTargetAng
-get the camera angle call it: camAng
-get the shortest angle between camAng and camToTargetAng= toAng
-newAng Mathf.Clamp(toAng, 60, -60);
-parent a smal unvisible object in front of the camera and rotate it newAng
-set a texture.x.y with WorldToScreenPoint to the smal, invislible object

I can move a textur with WorldToScreenPoint, but for the rest,
I have trubles with C# gramatics, wold some one help with the script?

This sounds like a reasonable approach, but I would suggest you try to write the script for it yourself, that is the only way you will learn and improve. Then if you get stuck, you can come back and ask a more specific question, which will be easier to help with.

one part is, I here:
Vector3 cameraDir = target.position -transform.position;
float angle = Vector3.Angle( cameraDir, transform.forward );

I try to get the angle betwen the camera to the target, why is angle a 1 demension variable, I think I need 2 Axies, pan and tilt.
If i turn right the angle valvue becomes bigger and if I rurn up or down angle becomes bigger to how can i get pan and tilt?

If you want pan and tilt, you can do the trigonometry yourself, with the Mathf.Atan2 function. See also atan2 - Wikipedia

Ok, thank you stego