How to use SyncListStruct properly?
PlayerAttributes.cs
[System.Serializable]
public struct PlayerAttributes {
public float attribute1;
public float attribute2;
....
public attributeX;
}
public class SyncListPlayerAttributes : SyncListStruct { }
Player.cs
public class Player : Entity {
public SyncListPlayerAttributes attributes = new SyncListPlayerAttributes ();
}
Right now I want to take the values inside variable "attributes" such as attribute1 , attribute2, etc. so that I can implement their logic inside Player script. How am I supposed to do that? Something like attributes.attribute1, attributes.attribute2, etc. wont work! I'm currently using structs because I can't have more than 32 SyncVars.
Your answer
Follow this Question
Related Questions
SyncVar gives the error Failure generating network code 1 Answer
syncvar not changing after command 0 Answers
Networking - Syncing color for all clients 0 Answers
Networking - Syncing an integer 0 Answers