using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; public class Controller : MonoBehaviour { // Start is called before the first frame update void Start() { var gameObjects = FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None); foreach (GameObject go in gameObjects) { if (go.GetComponent() != null) { Debug.Log("Object: "+go.name); go.AddComponent(); } } } // Update is called once per frame void Update() { } }