c# modify only one axis of a quaternion

I know that in Js you can directly modify one axis of a quaternion or Vector3, in c# you cant. So usually you just do something like:

void Update(){ 
transform.rotation = new Quaternion.Euler(transform.rotation.eulerAngles.x,10,transform.rotation.eulerAngles.x);
}

or something but the problem is that that still restricts another script from rotating the same object since it is constantly setting that objects rotation to the current rotation (Atleast that is the behavior I am getting). I am probably just overlooking something simple or being downright stupid.

If you only want to set one of the axes why not just create a public float property which can be accessed by any other script

public float rotY {
	get { return transform.rotation.eulerAngles.y; }
	set {
		Vector3 v = transform.rotation.eulerAngles;
		transform.rotation = Quaternion.Euler (v.x, value, v.z);
	}
}

(Or something similar to).Then you can access it by

OtherGameObject.rotY = 45;

I know this is old but after 2 of my 3 day holiday I dedicated to working on my game I could not get my particle I used as shrapnel to explode in the same direction the canon ball was heading as it arc’d. Code that finally worked below. Thanks you very much!

			transform.rotation = Quaternion.LookRotation(testRigid.velocity);
			Vector3 v = transform.rotation.eulerAngles;
			transform.rotation = Quaternion.Euler (v.x, v.y, 90);