Seminar_Cable_Joints_Unity/Assets/Controller.cs
2023-11-16 12:14:12 +01:00

27 lines
707 B
C#

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<GameObject>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
foreach (GameObject go in gameObjects) {
if (go.GetComponent<SpriteRenderer>() != null) {
Debug.Log("Object: "+go.name);
go.AddComponent<RollerProperties>();
}
}
}
// Update is called once per frame
void Update()
{
}
}