浏览代码

Added Context Menu in ToggleGameObjectAction to update entries based on current enabled state in scene.

/main
Thomas ICHÉ 5 年前
当前提交
f81e5b83
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 1
      CHANGELOG.md
  2. 13
      Runtime/LevelScripting/Actions/ToggleGameObjectAction.cs

1
CHANGELOG.md


* Added Global Variable Set Action
* Added Global Variable Logic
* Added Global Variables Reset Action
* Added Context Menu in ToggleGameObjectAction to update entries based on current enabled state in scene.
#### Changed

13
Runtime/LevelScripting/Actions/ToggleGameObjectAction.cs


{
public class ToggleGameObjectAction : ActionBase
{
[ContextMenu("Update Toggles from Current State")]
void UpdateFromCurrentState()
{
for (int i = 0; i < Targets.Length; i++)
{
if (Targets[i].GameObject == null)
continue;
Targets[i].State = Targets[i].GameObject.activeSelf ? GameObjectToggle.GameObjectToggleState.Enable : GameObjectToggle.GameObjectToggleState.Disable;
}
}
[ReorderableList]
public GameObjectToggle[] Targets;

正在加载...
取消
保存