Version: 2019.3
Unit Reference
Control

Self

Note
To use Bolt, which is Unity’s visual scripting solution, you must purchase it on the Unity Asset Store.

The Self unit returns the game object that owns the machine in which the graph runs.

Most of the time, units will default their target to self so you don’t have to explicitly use this node. This means that, for example, these two graphs are equivalent:

However, not all units support the self inline value. Those that do not will display None instead of Self in their default value field, for example the Destroy unit. In these cases, you must manually specify the connection if you mean to use Self:

You can use the self unit even in macros even if they are not “yet” owned by a game object. The self node will represent the owner of the graph at runtime, when it’s used in a machine.

Unit Reference
Control
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961