Hey guys,
I have a function thats takes a few parameters and returns an array of gameobjects.
However, no matter what I try it shows me this error(points to the return line):
“error CS0029: Cannot implicitly convert type UnityEngine.GameObject[]' to
UnityEngine.GameObject’”
Here’s my code:
public class HELPER_ReturnColliderPos {
public static GameObject ReturnColliders(Vector3 point, GameObject[] gameobjects)
{
GameObject[] vectors = new GameObject[gameobjects.Length];
vectors = gameobjects;
//update collider positions and return
return vectors;
}
}
I could definitely use some input and any bit of it, is of course, much appreciated!