Shared List

MagicTimm

Member
Hi,
is this possible to have a list as a shared variable?
My code is not working. In the inspector the variable of SharedPrioInTreeList is shown but without a value.

public class ToDoTaskPriority
{
public string name { get; set; }
public int priority { get; set; }
}

public class SharedPrioInTreeList : SharedVariable<ToDoTaskPriority>
{
public override string ToString() { return mValue == null ? "null" : mValue.ToString(); }
public static implicit operator SharedPrioInTreeList(ToDoTaskPriority value) { return new SharedPrioInTreeList { mValue = value }; }
}
 

Justin

Administrator
Staff member
It doesn't look like your code contains a list. Make sure your classes are serializable.
 
Top