Write (LogiXノード)

From Neos Wiki
Revision as of 21:30, 6 February 2022 by Aesc (talk | contribs) (Created page with "<code>OnDone</code> 出力は、<code>Write</code>にインパルスを入力した後に <code>Target</code> 値が正常に上書きされたとき、または <code>Target<...")
Jump to navigation Jump to search
Other languages:
English • ‎日本語 • ‎한국어
Write
'Write' LogiX node
Inputs
  Impulse Write
  dummy Value
Outputs
  IValue`1 Target
  Impulse OnDone
  Impulse OnFail

Writeノードは、Writeにインパルスを入力すると、参照されている Target 値を入力 Value値で上書きします。

使用方法

ノードブラウザから生成されたとき、Value入力はダミーのデータ型を持っています。これは、有効な入力が接続されたときに、入力データ型と一致するようにオーバーロードされます。入力のデータ型と、参照されているTargetのデータ型は一致しなければなりません。


OnDone 出力は、Writeにインパルスを入力した後に Target 値が正常に上書きされたとき、または Target 値が、書き込もうとした変数をフックできるシステム(例えばDrivenode,ValueCopyコンポーネントなど)によってドライブされる場合にインパルスを出力します。このインパルスは、Writeに到達したインパルスの連鎖を継続します。


The OnFail output fires an impulse when the Target value could not be set, e.g. if the Target value is driven from another source which does not allow hooking of the written value, or if there is no valid Target. This impulse continues the impulse chain which arrived at Write.


Changing the value of a Variable node, Component field etc. via a Write node results in a datamodel change which will then be synchronised to other users in the session. Note that changes are only synchronised at the end of every update so, if multiple writes to the same target are performed by a single client within an update, only the final value will be sent. Additionally, no changes will be broadcast if the value is reset to the value it held at the beginning of an update. Due to this synchronisation process, it is inadvisable to write to a value very regularly (e.g. every update) unless absolutely necessary. It is generally better to use the Drive system instead for continuously changing values to avoid unnecessary network traffic. Source.

Generally, with a Write/Write Latch node, one can only write to component or slot fields which are value-typed (e.g. bools, ints, strings, floats), whereas reference-typed fields (e.g. slot, user, IAssetProvider<AudioClip> etc.) require Write Ref. However, it is possible to write to reference-typed LogiX variable nodes using a Write/Write Latch node where it isn't possible to do so with Write Ref. It is also possible to write to reference-typed fields using Write/Write Latch if the input SetValue and ResetValue are RefIDs, rather than reference datatypes - it is generally not recommended to work with raw RefIDs though.

Outputs
Color Label Type
Target IValue<T>
OnDone Impulse
OnFail Impulse

使用方法

ノード・ブラウザからスポーンされた場合、値の入力にはダミー(または未決定)の型が入っています。入力データ型と参照されるターゲットのデータ型は一致しなければなりません。

Actions
Back -- ++ Drive Drive Playback Tween Write
Write Latch Write Ref Write Ref Latch