How to best synchronize a byte array?

I have a texture2D and I want to be in sync with everyone in the room so I converted the data into a byte array and sent it. This method makes the data sent quite large so synchronization is slow. Is there another way? What about RealtimeArray?
5 Replies
kapa.ai
kapa.ai3mo ago
Hi @Trần Tiến Đạt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information on synchronizing a byte array or using a RealtimeArray in NormalVR. However, they do mention that Normcore uses RealtimeComponents to synchronize data in your application, and that these components synchronize state between the Unity scene and a model in the Normcore datastore. For complex objects such as a Texture2D, the sources suggest picking out the pieces of data you would like to synchronize and using a RealtimeModel to synchronize them, as it's not possible to store a complex object in a model. You might want to check out the guide on Synchronizing custom data (https://normcore.io/documentation/realtime/synchronizing-custom-data) for more information on how to use a RealtimeModel in practice. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@1152048129353461810> kapa.ai is still learning and improving, please let us know how it did by reacting below
Trần Tiến Đạt
But when I convert texture2D into a byte array, then send it, can it still be synchronized?
Mechabit
Mechabit3mo ago
normcore isn't well suited to sending large files, better to upload it to amazon cloud and sync the url
liamc
liamc3mo ago
We send ultra-low-res, ultra-low-frame rate video via byte arrays. Its definitely possible, but once the res increases it fails to send so much data The texture is downscaled to 32x32 and serialized into a byte array using 3 bytes for each RGB pixel, and then loaded back into a texture using Texture.LoadRawTextureData(byteArray)
More Posts
Is it better to have more variables per RealtimeComponent?Say that I have 5 variables that I want to sync using a RealtimeComponent. Is it better to use 1 ReaDoes consolidating RealtimeComponents to have only one RealtimeView reduce bandwidth?For example, if I have a prefab with a root game object and a child game object. For some reason, asDoes an inactive RealtimeComponent utilize bandwidth?In our game, we have an object with multiple states. To simplify things, we have each of those stateIs Normcore able to support up to 100 people concurrently in a single room?I have purchase Normcore pro app key, but my app still could sync up to 10 users, then if more peoplHow do i get rid of normcore?Ive been using normcore for aa couple days but then i wanted to switch to photon. but whenever i delBest way to change VR Avatar scale at run timeI want to change an item on the VR Avatar to get smaller and bigger based on a collision - what's thDisconnecting immediatelyWe’ve started having an issue where users are immediately disconnected from rooms, but nothing’s chaDisable Local XR AvatarIt would be nice if there was a tick box to not create a local avatar. If you try to disable the locRealtimeCallback(RealtimeModelEvent.OnDidReadProperties)It seems that the RealtimeCallback always fires even if the RealtimeSet didn't change. This is the cWhat happens if we disable a rigidbody game object with a realtime transform and view on it?Will it be able to resume syncing if reenabled? Does it break the object?