Unity c#: making an array of class type equal to FindObjectOfType [closed]
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 1 year ago . Improve this question In my c# script I am working on, I have this code public class Attractor : MonoBehaviour { public Rigidbody rb; private void FixedUpdate() { //physics code Attractor[] attractors = FindObjectOfType<Attractor>(); } I am currently getting an error saying Error