Unity Asset User Manual missing "Interacting with the Patient"

Greetings,

The TOC for the Pulse Unity Asset User Manual refers to a section “Interacting with the patient” under the “Unity Components” header. But this section does not actual exist in the PDF document.

I’m thinking this info would be exceedingly useful. Does anyone know where else I can find it? Does the PDF need to be updated?

Thanks for any help,
andrew

Dang, and I just submitted the unity 3.2 update this morning
You can grab it from here early if you want

And that section header is still in there…
I suppose it should be removed since there is no content in there for that

The only thing we have in our scripts demonstrating interacting with a patient is the OnClick script. But this demonstrates interaction with the patient via the Unity editor, not really as part of the deployed game

Generally, each game development group I have talked to about using our asset has used the PulseEngineDriver mostly as is in their game, but they have instantiated it and passed it around in their game logic differently to get data from pulse, and create and pass actions into pulse while interacting with their game environment.

At the moment, we just don’t have this kind of complex environment interactions example as part of our asset.

I can try to answer any questions, but I am not an expert unity developer, but maybe some who is here can help out.

Thanks for the quick response. I had found the OnClick script and figured “interacting with the patient” mostly revolves around that script.

But, as you say, our goal is to configure custom patients and invoke actions in-game. Can you provide any guidance on how we would invoke an action in-game directly through the PulseEngineDriver?

thx!
andrew

Actually, on looking closer at the OnClick script it seems clear how you would invoke an action:

      case PulseAction.InjectMorphine:
        {
          SESubstanceBolus bo = new SESubstanceBolus();
          bo.SetSubstance(Substance.Morphine);
          bo.GetConcentration().SetValue(10, MassPerVolumeUnit.mg_Per_mL);
          bo.GetDose().SetValue(1, VolumeUnit.mL);
          bo.SetAdminRoute(SESubstanceBolus.eAdministration.Intravenous);
          driver.engine.ProcessAction(bo);
          break;
        }

You configure the appropriate action object, and invoke ProcessAction() on a reference to the driver. Presumably you can do this while the driver is running. Do I have this about right?

Thanks!
andrew

Yeah, should be that simple

Since the PulseEngineDriver is integrated in the unity game loop, all the unity classes are properly managed to be called in order during an iteration of the game loop. So your update call in your application class where you create an action and call process (and it will pass the action over to C++) will be called before the PulseEngineDriver update call were it invokes all the math.

Pulse provides an API for many different languages. To learn more about working with the Pulse API, you can find HowTo folders in many of the language folders in src Pulse provides an API for each of these languages, and they are designed to be very consistent with each other. So if you are looking for how to use a particular feature in Pulse and C# does not provide an example, look around in the other languages and it should be trivial to translate to the language of your application.

1 Like
Privacy Notice