HLAPI Messages with multiple parameters?

Include the following details (edit as applicable):

  • Issue category: Semantic Segmentation / Multiplayer / Real-time Mapping-Depth / ARDK Documentation / Unity Example Package / Sample App aka ‘AR Voyage’ / ARDK Virtual Studio Tools / Developer Tools / Networking
  • Device type & OS version: Android / iOS
  • Host machine & OS version: Mac / Windows
  • Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal
  • Xcode version:
  • ARDK version: 1.0.1
  • Unity version: 2021.2.7

I’m just wondering how do you send messages with multiple parameters with HLAPI? With low level I could just append the serialized bytes of multiple values, such as name, hp, position. But with NetworkedField and MessageStreamReplicator it seems like you can only sync one object/variable. I’m relatively new to networking so I apologize if i’m missing something obvious.

Hi Scott, the “Using the High-Level Networking API” documentation should provide the information you need with regards to multiple objects of different parameters you’ve mentioned. Let us know if you have any further questions!

Hi Scott,

Using the NetworkedField of the HLAPI, you can declare multiple unique fields and then assign each to pass their value.

Also, the ARDK Voyage Sample shows this in the SnowballBehaviour.cs file.

1 Like