Difference between revisions of "Write (LogiX node)/ja"
(Created page with "<code>OnFail</code> 出力は <code>Target</code> の値が設定できなかった場合、例えば <code>Target</code> の値が他のソースからドライブされ、...") |
(Created page with "WriteノードでVariableノード、Componentフィールドなどの値を変更すると、データモデルの変更が行われ、セッション内の他のユーザー...") |
||
Line 22: | Line 22: | ||
− | + | WriteノードでVariableノード、Componentフィールドなどの値を変更すると、データモデルの変更が行われ、セッション内の他のユーザーと同期されます。変更は更新の最後にのみ同期されるため、1 つのクライアントが同じターゲットに複数の書き込みを行った場合、最終的な値のみが送信されることに注意してください。さらに、値が更新の開始時に持っていた値にリセットされた場合、変更はブロードキャストされません。この同期処理のため、絶対に必要な場合を除き、非常に定期的に (たとえばアップデートのたびに) 値を書き込むことは望ましくありません。不必要なネットワークトラフィックを避けるため、連続的に変化する値には代わりに[[drive/ja|ドライブ]]システムを使用する方が一般的によいでしょう。[https://github.com/Neos-Metaverse/NeosPublic/issues/2590#issuecomment-874788205 ソース]. | |
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 (LogiX node)|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 <code>SetValue</code> and <code>ResetValue</code> are RefIDs, rather than reference datatypes - it is generally not recommended to work with raw RefIDs though. | 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 (LogiX node)|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 <code>SetValue</code> and <code>ResetValue</code> are RefIDs, rather than reference datatypes - it is generally not recommended to work with raw RefIDs though. |
Revision as of 21:32, 6 February 2022
Write | ||
---|---|---|
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
に到達したインパルスの連鎖を継続します。
OnFail
出力は Target
の値が設定できなかった場合、例えば Target
の値が他のソースからドライブされ、書き込んだ値をフックできない場合、または有効な Target
がない場合、インパルスを出力します。このインパルスはWrite
に到達したインパルスの連鎖を継続します。
WriteノードでVariableノード、Componentフィールドなどの値を変更すると、データモデルの変更が行われ、セッション内の他のユーザーと同期されます。変更は更新の最後にのみ同期されるため、1 つのクライアントが同じターゲットに複数の書き込みを行った場合、最終的な値のみが送信されることに注意してください。さらに、値が更新の開始時に持っていた値にリセットされた場合、変更はブロードキャストされません。この同期処理のため、絶対に必要な場合を除き、非常に定期的に (たとえばアップデートのたびに) 値を書き込むことは望ましくありません。不必要なネットワークトラフィックを避けるため、連続的に変化する値には代わりにドライブシステムを使用する方が一般的によいでしょう。ソース.
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.
使用方法
ノード・ブラウザからスポーンされた場合、値の入力にはダミー(または未決定)の型が入っています。入力データ型と参照されるターゲットのデータ型は一致しなければなりません。
Actions | ||||||
---|---|---|---|---|---|---|
Back | -- | ++ | Drive | Drive Playback | Tween | Write |
Write Latch | Write Ref | Write Ref Latch |