void Start() { if (!this._environment) { this._environment = FindObjectOfType <NeodroidEnvironment>(); } var neodroid_environment = this._environment; if (neodroid_environment != null) { this.TryRegister(this._environment_text, neodroid_environment.IdentifierString); this.TryRegister(this._environment_frame, neodroid_environment.FrameString); this.TryRegister(this._environment_obs, neodroid_environment.ObservationsString); this.TryRegister(this._terminated, neodroid_environment.TerminatedBoolean); } if (!this._evaluation_function) { this._evaluation_function = FindObjectOfType <ObjectiveFunction>(); } var evaluation_function = this._evaluation_function; if (evaluation_function != null) { this.TryRegister(this._signal, evaluation_function.SignalString); this.TryRegister(this._episode_length, evaluation_function.EpisodeLengthString); } if (!this._manager) { this._manager = FindObjectOfType <AbstractNeodroidManager>(); } if (this._manager) { if (this._status_text) { this.TryRegister(this._status_text, this._manager.StatusString); } if (this._testing_toggle) { this.TryRegisterProperty(this._testing_toggle.onValueChanged, this._manager.SetTesting); } } if (this._reset_button) { this.TryRegisterVoid(this._reset_button.onClick, this._manager.ResetAllEnvironments); } }
public override void PreSetup() { base.PreSetup(); if (!this._a) { this._a = this.GetComponent <TextMeshProUGUI>(); } if (!this._b) { this._b = this.GetComponentInParent <NeodroidEnvironment>(); } }