void Start() { // instantiate the FMU fmu = new FMU("bouncingBall", name); Reset(); }
void Awake() { //Set the target frame rate. Application.targetFrameRate = targetFPS; //Allow controller input to be processed. inputActions = new DroneController(); OnEnable(); ProcessInput(); //Instantiate the FMU fmu = new FMU("DroneSimulation_Polling", name); fmu.Reset(); fmu.SetupExperiment(Time.time); fmu.EnterInitializationMode(); fmu.ExitInitializationMode(); }
void Start() { // instantiate the FMU fmu = new FMU("values", name); // reset & sync the UI Reset(); // get the value references vr_x = fmu.GetValueReference("x"); vr_int_in = fmu.GetValueReference("int_in"); vr_bool_in = fmu.GetValueReference("bool_in"); vr_string_in = fmu.GetValueReference("string_in"); // listen to changes in the UI realInSlider.onValueChanged.AddListener(SetX); intInSlider.onValueChanged.AddListener(SetIntIn); boolInToggle.onValueChanged.AddListener(SetBoolIn); stringInInputField.onValueChanged.AddListener(SetStringIn); }