Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

How do I use SyncListStruct

$
0
0
I am trying to sync a list of structs.

I am setting up the list like so:
Code (CSharp):
  1. public struct MyStruct
  2. {
  3.     public float value1;
  4.     public float value2;
  5.     public bool value3;
  6. }
  7.  
  8. public class MyStructSyncList : SyncListStruct<MyStruct> {}
  9.  
  10. private MyStructSyncList myStructs = new MyStructSyncList();
To update/change the values I use Commands:
Code (CSharp):
  1. [Command]
  2. public void CmdAddToStruct(float value1)
  3. {
  4.     MyStruct temp = new MyStruct();
  5.     temp.value1 = value1;...
How do I use SyncListStruct

Viewing all articles
Browse latest Browse all 16796


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>