How to pass a pointer to structure to a function? For example in this function I need to change Vector3 value:
function ChangeVector( vec : Vector3 ) { vec.x = 0; }
function Main( ) { var vec = Vector3( 1, 1, 1 ); ChangeVector( vec );
... vec.x should be 0.
As far as I look at Collider.Raycast which is:
function Raycast (ray : Ray, out hitInfo : RaycastHit, distance : float) : bool;
and where RaycastHit is structure it is possible to do it.
PS: Is it possible to do this for simple variables like "int"?