Unity插件uTomate自动化

来源:互联网 发布:bigemap软件 编辑:程序博客网 时间:2024/06/03 22:00
Automation Plan(自动化计划)
an automation plan controls the order in which actions are being performed. It consists of automation plan entries. Automation plans are edited in the uTomate automation plan editor window.
自动化计划控制执行操作的顺序。它由自动化计划条目组成。自动化计划在uTomate自动化计划编辑器窗口中被编辑。




Automation Plan Entry(自动化计划条目)
an automation plan entry is a control structure of an automation plan. An entry can be anything from as simple as "Execute a single action" up to "Execute another plan". There are also entries for making decisions or running things in a loop.
自动化计划条目是自动化计划的控制结构。一个条目可以是任何东西,从简单到“执行一个动作”到“执行另一个计划”。也有用于决策或循环运行的条目。




Action(行动)
an action is a piece of work that can be done independently. You can create actions and configure them in the Unity3D inspector window.
行动是一件可以独立完成的工作。您可以创建操作并在Unity3D检查器窗口中配置它们。




Automation plans(自动化计划)
Overview(综述)
Automation plans consist of a set of automation plan entries. Using the entries you can control the order in which your actions are running. Each entry can be connected to another entry. When you run an automation plan, uTomate will start executing the entry which is marked as the first entry. Once an entry has finished executing, the entry that is connected to this entry as as Next Entry will be executed. Once an entry has no more next entry, the automation plan is finished. There are specialised entry types which allow you to add decisions or loops to your automation plan, therefore enabling you to visually script the flow of your automation.
自动化计划包括一组自动化计划条目。使用可以控制操作的顺序的条目。每个条目可以连接到另一个条目。当您运行一个自动化计划时,uTomate将开始执行被标记为第一个条目的条目。一旦条目执行完毕,连接到该条目的条目将被执行。一旦条目没有下一个条目,自动化计划就完成了。有专门的输入类型允许您添加决策或循环到您的自动化计划,因此使您能够可视化地编写自动化的流程。






Creating automation plans(创建自动化计划)
To create an automation plan, right-click the folder in which you want to create the plan, then select Create → uTomate → Automation plan.
创建一个自动化计划,右键单击文件夹,你想创建计划,然后选择创建→uTomate→自动化计划。






Editing automation plans(编辑自动化计划)
Automation plans are not edited in the Unity inspector. Instead we have provided a specialised visual editor for editing them. To open the automation plan editor go to the main menu and select Window → uTomate → Automation Plan Editor.


At the top of the automation plan editor you can see the automation plan selector. You can select a plan for editing by clicking on the dot icon at the right of the plan selector. Alternatively you can drag an automation plan from the project tree on the plan selector. The rest of the automation plan editor is divided in two sections. On the left side you see the entries that are part of the automation plan in a node view. On the right side you see the entry inspector which allows you to modify the properties of the currently selected entry.


自动化计划没有在Unity检查器中编辑。相反,我们提供了一个专门的可视化编辑器来编辑它们。打开自动化计划进入主菜单,选择编辑窗口→uTomate→自动化计划编辑器。
在自动化计划编辑器的顶部,您可以看到自动化计划选择器。您可以通过点击计划选择器右边的点图标来选择编辑计划。或者,您可以在计划选择器上从项目树中拖动自动化计划。自动化计划编辑器的其余部分分成两个部分。在左侧,您可以看到在节点视图中作为自动化计划的一部分的条目。在右侧可以看到条目检查器,它允许您修改当前选择的条目的属性。




In the node view you can see which entries are currently part of your automation plan. Each node in the node view represents a single entry of the automation plan. The first entry of the automation plan is highlighted with a blue ribbon. When you run an automation plan it will start with the node marked with that blue ribbon. To set an entry as the first entry, right-click that entry and select the Set As First Node option in the context menu. To delete an entry, right-click the entry and select the Delete Node option in the context menu. This will automatically delete all incoming and outgoing connections of that entry as well. You can add new entries to an automation plan by right-clicking on a free space in the node view. This will open a context menu from which you can select which type of entry you’d like to add. Please look at the Entry types section for more information about the available entry types.
在node视图中,您可以看到哪些条目目前是您的自动化计划的一部分。节点视图中的每个节点表示自动化计划的单个入口。自动化计划的第一个条目用一条蓝丝带突出显示。当您运行一个自动化计划时,它将从带有蓝色丝带的节点开始。要将条目设置为第一个条目,请右键单击该条目并在上下文菜单中选择作为第一个节点选项的set。若要删除条目,请右键单击条目,并在上下文菜单中选择delete Node选项。
这将自动删除该条目的所有传入和传出连接。您可以通过右键单击节点视图中的空闲空间向自动化计划添加新条目。这将打开一个上下文菜单,您可以从中选择您想添加的条目类型。请查看条目类型部分,了解更多关于可用条目类型的信息。






The automation plan entries can be connected with each other using connectors. These connections control which entry is executed after which. Each connector can only be connected to a single entry, however multiple connectors can connect to the same entry. Most entries have only a single connector named Next Entry which should be connected to the entry that you want to be executed after the originating entry. To connect two entries simply drag a connection from the connector to another entry (click on the connector circle, keep the mouse button down and then drag into the direction of the other entry. When you are above the other entry, release the mouse button). To delete a connection, right-click the connector circle of the entryfrom where the connection starts and then select the Delete Connection option in the context menu. To connect an already connected connector to a different entry, simply drag a new connection from the connector to the new entry. It will replace the old connection.
自动化计划条目可以使用连接器彼此连接。这些连接控制在此之后执行的条目。每个连接器只能连接到一个条目,但是多个连接器可以连接到同一个条目。大多数条目只有一个名为Next的连接器,该连接器应该与您希望在原始条目之后执行的条目连接。要连接两个条目,只需将连接从连接器拖到另一个条目(单击连接器圆,将鼠标按钮保持向下,然后拖动到另一个条目的方向)。当您在其他条目之上时,释放鼠标按钮。要删除连接,请右键单击连接开始处的entryfrom的连接器圆,然后在上下文菜单中选择delete connection选项。要将已连接的连接器连接到不同的条目,只需从连接器拖动新的连接到新条目。它将取代旧的连接。






Be careful when connecting entries. uTomate cannot safely determine whether or not your connected entries form a circle (especially when using loop or decision entries with expressions). When the entries form a circle, your automation plan might loop forever (again depending on the used expressions) and you will have to manually stop it.
连接条目时要小心。uTomate不能安全地确定您的连接条目是否形成一个循环(尤其是使用带有表达式的循环或决策条目时)。当条目形成一个圆时,您的自动化计划可能永远循环(这取决于使用的表达式),您必须手动停止它。




---------------------------------------------------------------------------------------------------------------------




Automation plan entries(自动化计划项)
Overview(综述)
uTomate comes with 6 types of automation plan entries, which you can combine into automation plans.
uTomate有6种自动化计划条目,您可以将其合并到自动化计划中。




---------------编辑下右键创建--------------


Run Action(运行操作)
The Run Action entry will execute a single action and is the bread and butter automation plan entry that you will use most of the time. You can add a Run Action entry using the context menu or by simply dragging an action from your project tree into the node view.
运行操作条目将执行单个操作,并且是您将在大部分时间内使用的面包和黄油自动化计划条目。您可以使用上下文菜单添加一个运行操作条目,或者简单地将一个动作从项目树拖放到节点视图中。




Action(行动)
optional(可选)
The action that should be run. If no action is specified, the entry will do nothing.
应该运行的操作。如果没有指定操作,则该条目将不执行任何操作。




---------------------


Decision(决定)
The decision entry allows you to add decisions to your automation plan. For example you might not want to run parts of your plan on certain platforms or you might want to skip expensive parts of your plan without having to modify the plan over and over again. The decision entry has two connectors Entry If True and Entry If False. In the inspector of the decision entry you can specify the decision to be made. By default this is a simple check box. If you tick the check box the entry that is connected to Entry If True will be executed next. If the checkbox is not ticked the entry that is connected to Entry If False is connected. You can switch the decision property to expression mode to dynamically evaluate an expression when the entry is executed. If this expression evaluates to true the entry connected to Entry If True will be executed next, otherwise the entry connected to Entry If False will be executed next.
决策条目允许您将决策添加到您的自动化计划中。例如,你可能不想在某些平台上运行你的计划的部分内容,或者你可能想跳过你的计划的昂贵部分,而不必一次又一次地修改计划。如果True和entry是False,则决策条目将有两个连接器条目。在决策条目的检验员中,您可以指定要做出的决定。默认情况下,这是一个简单的复选框。如果您在复选框中勾选,则连接到条目的条目将在下一个被执行。如果复选框没有勾选与条目连接的条目,如果错误连接。您可以将决策属性切换到expression模式,以便在执行条目时动态评估表达式。如果此表达式计算为true,则连接到条目的条目将在next被执行,否则将在next被执行的条目连接到条目。




Decision(决定)
required(要求)
The decision to be made. You will almost always want to put this into expression mode.
决定要做出来。你几乎总想把它放到表达式模式中。




---------------------


For Each(为每一个)
The For Each entry repeats a part of the automation plan for each entry in a given list or array. When the For Each entry is running it will read a list of items from the configured Items property. Then it will write the currently iterated item into a configured Item property and run the automation plan entry that the Start Of Subtree connector is pointing to. Once the last entry in the subtree has been executed, the For Each entry will write the next item from the Items list into the Item property and then again run the entry to which the Start Of Subtree connector is pointing. This will be repeated until every item in the list has been iterated over.
对于每个条目,对于给定列表或数组中每个条目的自动化计划的一部分都是重复的。当为每个条目运行时,它将从配置的项属性中读取项目列表。然后,它将将当前遍历的项写入一个已配置的项目属性,并运行子树连接器开始指向的自动化计划条目。一旦执行了子树中的最后一个条目,每个条目将从Items列表中写入下一个条目,然后再运行子树连接器开始指向的条目。这将会重复,直到列表中的每一个条目都被迭代结束。




Items Property Name(物品属性名)
required(要求)
The name of the property which contains the list of items.
包含项目列表的属性的名称。


Item Property Name(项目属性名)
required(要求)
The name of the property which should be filled with the currently iterated item.
应该填充当前迭代项的属性的名称。


Index Property Name(索引属性名)
optional(可选)
The name of the property which should be filled with the current index in the list of items.
应该在项目列表中填充当前索引的属性的名称。




---------------------


For Each File(为每一个文件)
This entry works similar to the For Each entry, but instead of a list of items, it works on a file set. It has properties for specifying files to be included and excluded from the file set (just like a lot of uTomates actions have). The currently iterated file will be written into a configured property- When you run this entry, it will first build the file set based on the specification. Then it will put the name of the first file in the file set into the property given in File Property Name. Then the entry that the Start Of Subtree connector is pointing to will be run. After the sub-tree is executed, the whole process will be repeated for the next file in the file set until all files in the file set have been iterated over.
这个条目与每个条目相似,但不是一个项目列表,而是在一个文件集上工作,它具有指定要包含的文件和排除在文件集中的属性(就像很多uTomates动作一样)。当前遍历的文件将被写入一个已配置的属性——当您运行此条目时,它将首先根据规范构建文件集。然后,它将把文件中第一个文件的名称放在文件属性名称中指定的属性中。然后,子树连接器开始指向将运行的条目。在子树执行之后,整个过程将在文件集的下一个文件中重复,直到文件集中的所有文件都被遍历。




File Property Name(文件属性名)
required
The name of the property which should be filled with the current file name.
应该填充当前文件名的属性的名称。


Index Property Name(索引属性名)
optional
The name of the property which should be filled with the index of the current file in the file list.
应该在文件列表中填充当前文件索引的属性的名称。


Includes(包括)
optional
The files to be included into the file set.
将被包含到文件集中的文件。


Excludes(不包括)
optional
The files to be excluded from the file set.
将被排除在文件集中的文件。




---------------------


Run Plan(运行计划)
The Run Plan entry allows you to run another automation plan as part of this automation plan. This is useful if you want to re-use the logic from one plan in another.
运行计划条目允许您运行另一个自动化计划作为自动化计划的一部分。如果你想在另一个计划中重新使用逻辑,这是很有用的。




Plan(计划)
required
The automation plan to be run.
自动化计划要运行。




---------------------


Note(请注意)
The Note automation plan entry allows you to place notes on your plan. This is useful for documenting parts of your automation that might not be self-explanatory. It can also be used to document prerequisites of the plan (e.g. some editor properties that need to be set before the plan can be run). This entry is special in that it has no connectors, cannot be set as the first entry and therefore not be executed. It is for documentation purposes, only.
笔记自动化计划条目允许你在你的计划上注明。这对于记录可能无法解释的自动化部分非常有用。它还可以用来记录计划的先决条件(例如,在计划运行之前需要设置一些编辑器属性)。这个条目是特殊的,因为它没有连接器,不能作为第一个条目设置,因此不被执行。它仅用于文档目的。




Text(文本)
optional
A text note to document the automation plan.
一个文本注释来记录自动化计划。




------------------------------------------------------------------------------------------------------------------


Actions(行动)
Creating actions(创建操作)
To automate any work using uTomate you use actions. To create an action simply right-click the folder in your project where you want to add the action. Then select Create → uTomate and select the kind of action you want to create. You can find a description of all actions at our uTomate actions reference pages.
使用uTomate操作来自动化任何工作。要创建操作,只需右键单击要添加动作的项目中的文件夹。然后选择创建→uTomate并选择您想要创建的行动。您可以在我们的uTomate操作参考页面中找到所有操作的描述。




Editing actions(编辑动作)
When you select an action in the project view, the action’s properties will be displayed in Unity’s inspector panel. The inspector works the same way as the usual Unity3D inspector, so for each property of an action you will see a line in the inspector which enables you to modify this property. In addition to this, there are a few other elements which are described in the following image:
当您在项目视图中选择一个操作时,动作的属性将显示在Unity的inspector面板中。检查器的工作方式与通常的Unity3D检查器相同,因此,对于动作的每个属性,您将看到检查器中的一行,它允许您修改此属性。除此之外,还有一些其他的元素被描述如下图: