In the following line of code, _pro is another class's instance that has a Transform called Target and posi is a Vector3 as well and has a valid value.
_pro.Target.transform.position = new Vector3(posi.x, posi.y, posi.z);
I want to assign the value of posi to Target.transform.position but it throws a NullReferenceException.
After inspecting each part, _pro is null. Here is how I tried to instantiate _pro:
public projectile _pro;
GameObject go = GameObject.Find("enemy"); // go is not null
_pro = go.GetComponent<projectile>(); // _pro is null