- Home /
Question by
MohammadAlizadeh · Jul 30, 2017 at 12:09 PM ·
networkingvector3listlinerenderersync
How to Sync List
Hello, i need to sync vector3 list that i stored so clients can see positions of the LineRenderer that i used for painting I'm kinda trying to make multiplayer painting game
I can't just type [SyncVar] on top of it.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Networking;
public class StoreLineRenderValues : NetworkBehaviour {
public List<Vector3> positions;
}
I searched a lot and i found struct but i have no idea how to use it
Thanks
Comment
Best Answer
Answer by MohammadAlizadeh · Aug 02, 2017 at 01:48 PM
Well i converted it to array and stored it inside Vector3[ ] then i used [ClientRPC] and [Command] to send the arrays
Your answer
Follow this Question
Related Questions
Why Does Adding to My SyncListStruct Break SyncVar? 0 Answers
SyncVar on objects in a list 1 Answer
Syncing/Instantiating a LineRenderer on Network 2 Answers
Networking: how to sync complex objects 0 Answers
SyncList TO 3 Answers