Visual Scripting with Playmaker (Professional version only)

Please note, that the Playmaker integration is only available in the Game4Automation Professional asset.

Playmaker is a visual scripting tool. You can get it in the Unity Asset Store https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-368

With Playmaker it is possible to define simulation models without the need of c# scripting. Playmaker provides a very easy and intuitive programming interface with Finite State Machines (FSM). A FSM created by connecting different states with events. A state can be exited by different events (conditions). As long, as the condition is not true and the state is not ended automatically (you can define states which are exited immediately) the FSM is staying in the current state. There can be only one state active in a FSM.

Installation

For installing Playmayker you need to get it from the Unity Asset Store and import it into your project.

After installing please select game4automation > Apply standard settings in the Unity main menu. This should add GAME4AUTOMATION_PLAYMAKER into the Scripting Define Symbols.

After successfull installation you should be able to open the PlayMaker action window. First open a PlayMaker window by selecting PlayMaker > PlayMaker Editor in the Unity main menu. Now you can open the PlayMaker Actions Window with PlayMaker > Editor Windows > Action Browser

There you can find under the Tab Game4Automation all actions which are added to PlayMaker by Game4Automation:

For an example please check the PlayMaker demo model under Assets/game4automation/private/PlayMaker/Game4AutomationPlayMaker.unity

Actions

Cylinder In Out

Action to move a Cylinder out. This Action needs as a reference a Gameobject with an attached Drive_Cylinder behavour script attached to it.
This action is exited as soon as the cylinder movement is finished.

Drive Start

Action to start a Drive. This Action needs as a reference a Gameobject with an attached Drive script attached to it.
You can define it the Drives should move forward or backwards and you can optionally set the speed or the acceleration for the drive.
Usually this action is exited immediately. But if you define a Sensor at Stop At Sensor the drive will stop as soon as the sensor is getting occupied.

Drive Stop

Action to stop a Drive. This Action needs as a reference a Gameobject with an attached Drive script attached to it.
This action is exited immediately.

Drive To

Action to move a Drive to a certain position. This Action needs as a reference a Gameobject with an attached Drive script attached to it.

Get PLC Signal

Action to get a PLC Input or Output Signal. This Action needs as a reference a Gameobject with an attached PLC Signal script attached to it. Dependent on the signal type the corresponding Int, Bool or Float value will be set.
This action is exited immediately after the value is set.

Set PLC Signal

Action to set a PLC Input or Output Signal. This Action needs as a reference a Gameobject with an attached PLC Signal script attached to it.
This action is exited immediately after the value is set.

UI Lamp On

Action to turn a UI Lamp on or of. This Action needs as a reference a Gameobject with an attached UILamp script attached to it.
This action is exited immediately after the lamp is turned on.

Wait For PLC Signal

Action to wait for a PLC Input or Output Signal. This Action needs as a reference a Gameobject with an attached PLC Signal script attached to it.
This action waits until the defined signal value is reached.

Wait For Sensor

Action to wait for a Sensor. This Action needs as a reference a Gameobject with an attached Sensor script attached to it. You can wait for the sensor to be occupied or empty.
This action waits until the defined sensor status is reached.

Wait For UI Button

Action to wait for a UI Button. This Action needs as a reference a Gameobject with an attached UIButton script attached to it.
This action waits until the button is pressed or not pressed.


© 2019 in2Sight GmbH https://game4automation.com - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.