Unity - Procedural Scenario Creation


I am trying to create my own custom Scenario Driver in which the scenario is procedurally created at runtime instead of using one of the scenario files.
To do this I have commented out the code which initialises the state file from the editor and the section which initialises from a specified path (lines 74-89) so that the code reaches the example given.
Then, I altered line 94 and set the path of the StandardMale.json to StreamingAssets where it is contained.
When running the scene it instantly crashes my Unity Editor and I am unsure why. I have attached a screenshot of my PulseEngineScenarioDriver.cs

First thing I would do is check the Unity Log, and the Pulse Log

See if that gives you some hints

The Unity Log shows that it is crashing on the InitializePatient function but nothing more.
The Pulse Log on the other hand is showing that it cannot find the substance directory at “./” and I’m not sure where to put the substance directory so that the Pulse engine can find it.

I also tried the “Creating a new patient section” in the Unity ReadMe and then using a scenario with a patient configuration instead of a state but the it looks like that section may be out of date as I get an error saying the InitializeEngine function does not take 3 arguments

Screenshot 2022-08-02 133908

Sounds like the same problem as this