Instantiating on passed parameters?

Basically, I’m trying to instantiate a breaching charge on a wall. It’s easy enough to instantiate on a fixed position, but I’m looking to pass two parameters into the PlantCharge() function that the contains my instantiation of the charge. I want to pass the two parameters, which will be the rotation and position of wall, but it seems that I’m stuck with Vector3 for the position and Quaternions for the rotation.

I was hoping to have the player plant a charge on a wall, and then have the walls position and rotation be the position and rotation for the charge.

Is it at all possible to take those two variables as parameters? I’m writing in C#.

It sounds like you need to redefine how your code is structured. In pseudo code:

Raycast verify we are allowed to plant.
If yes, use HitInfo to get rotation and position of wall.
Instantiate the object using the wall's position and rotation. (Quaternion.Euler)
Initialize anything else.

You should already be verifying the wall so this shouldn’t add much more to your code.