Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
198 stars 9 forks source link

References created using CreateDynamicVariable and WriteOrCreateDynamicVariable cannot be accessed immediately #3909

Open mpmxyz opened 12 months ago

mpmxyz commented 12 months ago

Describe the bug?

When you create a DynamicReferenceVariable using LogiX you have to wait 3 updates until you can read from/write to it.

Relevant issues

I haven't found any issue describing the same problem.

2012 is related in a way that it also suffers from the delayed linking proces of DynVars.

To Reproduce

  1. Create a new dynamic reference variable using CreateDynamicVariable or WriteOrCreateDynamicVariable nodes
  2. Read from/write to that variable using LogiX nodes directly following the variable creation.
  3. Reading/Writing will fail. ("not found")
  4. After 3 update delays it will work.

Expected behavior

Reading/writing should work immediately

Log Files

No response

Screenshots

CreateDynVar_Ref_Bug This example uses a logging tool looking like an oversized LogiX node.

How often does it happen?

Always

Does the bug persist after restarting Neos?

No

Neos Version Number

2022.1.28.1310

What Platforms does this occur on?

Windows

Link to Reproduction Item/World

neosdb:///e3fb6922f305e0ed9e84df954c301addd70c0948d9288ee68fae12672e82ff75.7zbson

Did this work before?

I Don't Know

If it worked before, on which build?

No response

Additional context

DynamicVariableHelper.CreateVariable(...) calls DynamicValueVariable.UpdateLinking() for primitive types. DynamicVariableHelper.CreateReferenceVariable(...) on the other hand does not.

A workaround is to store RefIDs and unpack them using some write node/Reference typed field trickery.

Reporters

mpmxyz / mpmxyz#3716

Drison64 commented 10 months ago

Hi! This issue is briefly talked about here