27 lines
707 B
C#
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()
|
|
{
|
|
|
|
}
|
|
}
|