<commit_before>﻿using UnityEngine;

namespace Pear.InteractionEngine.Controllers
{
	/// <summary>
	/// Based class for script that need to use a controller
	/// </summary>
	/// <typeparam name="T">Type of controller</typeparam>
	[RequireComponent(typeof(Controller))]
	public class ControllerBehavior<T> : MonoBehaviour where T : Controller
    {
        private T _controller;
        protected T Controller
        {
            get
            {
                return _controller ?? (_controller = GetComponent<T>());
            }
        }
    }
}<commit_msg>Controller behaviors shouldn't need to be on the Controller game object<commit_after>﻿using UnityEngine;

namespace Pear.InteractionEngine.Controllers
{
	/// <summary>
	/// Based class for script that need to use a controller
	/// </summary>
	/// <typeparam name="T">Type of controller</typeparam>
	public class ControllerBehavior<T> : MonoBehaviour where T : Controller
    {
		// The controller
        public T Controller;

		void Start()
		{
			// If the controller was not set, try to set it automatically
			Controller = Controller ?? GetComponent<T>();
		}
    }
}
{'fraction_non_alphanumeric': 0.1056338028169014, 'fraction_numerical': 0.0, 'mean_word_length': 2.79, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6273571', 'n_tokens_mistral': 310, 'n_tokens_neox': 299, 'n_words': 97}