Quaternion.identityは、回転していないときの回転値が得られます。値は(0, 0, 0, 1)です。transform.rotationに代入すると回転が0になります。
Quaternion.identityを入れるのが子オブジェクトだとどうなるでしょうか。
今シーンに2つのCubeがあります。黄色いCubeが青いCubeの子になっています。
親のCubeにスクリプトを付けました。
スクリプトを使って、これらのCubeを左ドラッグで回転させます。右クリックで回転にQuaternion.identityを入れます。
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
public class CubeController : MonoBehaviour
{
    [SerializeField] float turnSpeed = 5f;
    Transform childCube;
    // Start is called before the first frame update
    void Start()
    {
        // 黄色いCubeのトランスフォーム
        childCube = transform.GetChild(0);
    }
    // Update is called once per frame
    void Update()
    {
        // 左クリック中は回転させる
        if (Input.GetMouseButton(0))
        {
            var x = CrossPlatformInputManager.GetAxis("Mouse X");
            var y = CrossPlatformInputManager.GetAxis("Mouse Y");
            // シフトキーを押している時は子を回転
            if (Input.GetKey(KeyCode.LeftShift))
            {
                childCube.localRotation *= Quaternion.Euler(childCube.InverseTransformDirection(Camera.main.transform.up) * x * -turnSpeed);
                childCube.localRotation *= Quaternion.Euler(childCube.InverseTransformDirection(Camera.main.transform.right) * y * turnSpeed);
            }
            // 押していないときは親を回転
            else
            {
                transform.localRotation *= Quaternion.Euler(transform.InverseTransformDirection(Camera.main.transform.up) * x * -turnSpeed);
                transform.localRotation *= Quaternion.Euler(transform.InverseTransformDirection(Camera.main.transform.right) * y * turnSpeed);
            }
        }
        // 右クリックでリセット
        else if(Input.GetMouseButtonDown(1))
        {
            // シフトキーを押しているときは子
            if (Input.GetKey(KeyCode.LeftShift))
            {
                // コントロールキーを押しているときはワールド
                if(Input.GetKey(KeyCode.LeftControl))
                {
                    childCube.rotation = Quaternion.identity;
                }
                // 押していないときはローカル
                else
                {
                    childCube.localRotation = Quaternion.identity;
                }              
            }
            // シフトキーを押していないときは親
            else
            {
                transform.localRotation = Quaternion.identity;
            }
        }
    }
}
右クリックしたときに、シフトキーとコントロールキーを押していたら、子オブジェクトのワールド回転に代入します。シフトキーだけのときはローカル回転に代入します。
ワールドの場合は、親の回転とは関係なく子がワールドの軸に対して無回転の状態になるので、その後親の回転をリセットすると、子は変な方向を向きます。
ローカルの場合は、親の軸に沿っているので、親の回転をリセットすると元に戻ります。








