Write Ref (로직스 노드)

From Neos Wiki
Revision as of 05:04, 19 February 2022 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Other languages:
English • ‎日本語 • ‎한국어

이 노드는 Impulse가 입력되면, 입력측 Target(IWorldElement)의 참조(Slot)를 출력에 전달합니다.

입력인자 & 반환값

입력인자(Input parameters)
자료형 대표색 인자명 기본 자료형 사용 가능 자료형 연결 가능 자료형
Write Impulse 없음 없음
Target IWorldElement 없음 string
반환값
자료형 대표색 인자명 자료형
Reference SyncRef<T>
OnDone Impulse
OnFail Impulse


The OnDone output fires an impulse when the Reference target value has been successfully overwritten after an impulse was received at Write or the Reference target value is driven by a system which allows an attempted written variable to be hooked (e.g. ReferenceCopy component, etc.). This impulse continues the impulse chain which arrived at Write.


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


Changing the value of a Component field etc. via a Write Ref 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, to avoid unnecessary network traffic it is inadvisable to write to a target very regularly (e.g. every update) unless absolutely necessary . Source.

Generally one should write to component or slot fields which are reference-typed (e.g. slot, user, IAssetProvider<AudioClip> etc.) using Write Ref. However, it is not possible to write to reference-typed LogiX variable nodes using a Write Ref node whereas it is possible to do so with Write/Write Latch. It is also possible to write to reference-typed fields using Write/Write Latch if the inputs are RefIDs, rather than reference datatypes. However, it is generally not recommended to work with raw RefIDs though - better to use Write Ref with the correct datatypes.

Write Ref node

사용방법

객체 참조를 임펄스 신호를 통해 다른 참조 정보로 전달할때 사용합니다. 실 사용례로 인스펙터에서 LogiX 툴을 통해 추출한 속성목록 중 Slot을 입력측 Target에 연결하고, 다른 객체의 parent 속성을 출력측 Reference에 연결한 후 입력에 Impulse를 발생시키면 출력측에 연결된 객체의 부모가 입력측의 자식으로 변경됨을 확인할 수 있습니다.

위 상태에서 입력측 Target에 string을 연결하고 빈값을 지정한 다음 Impulse를 발생시키면, parent에 빈값이 입력되어 참조관계가 해제됩니다.

단, 컴포넌트 노드 연결시 출력측 Reference를 먼저 연결해야 작업이 수월해집니다.

Actions
Back -- ++ Drive Drive Playback Tween Write
Write Latch Write Ref Write Ref Latch
References
Back -> Allocating User RefID Write Ref