Write Latch (로직스 노드)
Write Latch | ||
---|---|---|
Inputs | ||
Impulse | Set | |
Impulse | Reset | |
dummy | SetValue | |
dummy | ResetValue | |
Outputs | ||
IValue`1 | Target | |
Impulse | OnSet | |
Impulse | OnReset |
이 노드는 Set
또는 Reset
중 Impulse가 들어오는 곳에 따라 입력측의 SetValue
또는 ResetValue
의 값을 출력인 Target
로 전달합니다.
사용방법
이 노드는 처음 꺼내면, 입력측 Value
는 dummy 자료형(자료형이 정해지지 않은 상태를 의미)을 가집니다. 입력에 사용 가능한 데이터를 연결하면 자료형이 결정됩니다. 입력 자료형이 경정되면 출력측 Target
의 자료형도 동일하게 지정됩니다.
Set
에 impulse가 들어오면, OnSet
에 연결된 입력값을 Target
에 쓰고 OnSet
으로 impulse를 전송합니다.
Reset
에 impulse가 들어오면, OnReset
에 연결된 입력값을 Target
에 쓰고 OnReset
으로 impulse를 전송합니다.
Changing the value of a Variable node, Component field etc. via a Write Latch 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.
예제
아래의 두 이미지는 동일한 기능을 수행하지만 로직스의 구성이 다른 예를 보여 줍니다.Write 노드 2개를 이용하여 유사하게 만들어진 것입니다. 입력과 출력이 정확히 일치하지 않다는 점은 인지하고 봐 주시면 됩니다.
노드 메뉴(Node Menu)
Actions | ||||||
---|---|---|---|---|---|---|
Back | -- | ++ | Drive | Drive Playback | Tween | Write |
Write Latch | Write Ref | Write Ref Latch |