// Use this for initialization void Start() { AutoTuneButton = GameObject.Find("AutoTuneButton").GetComponent <UnityEngine.UI.Button>(); // TargetOpenness = GameObject.Find("TargetOpenness").GetComponent<UnityEngine.UI.InputField>(); // TargetDensity = GameObject.Find("TargetDensity").GetComponent<UnityEngine.UI.InputField>(); tuner = DAN.Instance.tuner; analyser = DAN.Instance.analyser; MetricReportPanel = GameObject.Find("MetricReportPanel"); TargetMetricPanel = GameObject.Find("MetricListPanel"); TunableParameterPanel = GameObject.Find("ParameterListPanel"); SetupTuningUI(DAN.Instance.GetGeneratorMB()); }
void Awake() { Instance = this; tuner = GetComponent <AutoTuner>(); analyser = GetComponent <LevelAnalyser>(); mapSprite = GameObject.Find("MapSprite"); foreach (MonoBehaviour b in generator.GetComponents <MonoBehaviour>()) { foreach (MethodInfo method in b.GetType().GetMethods()) { foreach (Attribute attr in method.GetCustomAttributes(false)) { if (attr is Generator) { Debug.Log(generator.name + "." + method.Name); generateMapMethod = method; targetBehaviour = b; } } } } }