Creating your own syncable member
Extending what can be synced from the Configure window
using UnityEngine;
public class Inventory : MonoBehaviour
{
[System.Serializable]
public class Item
{
public int id;
public string name;
public int durability;
}
public Item[] items = new Item[]
{
new Item {id = 0, name = "Shield", durability = 80},
new Item {id = 1, name = "Stick", durability = 50},
new Item {id = 2, name = "Stone", durability = 100},
};
public Item GetItem(int id)
{
foreach (var item in items)
{
if (item.id == id)
{
return item;
}
}
return default;
}
}
Creating a custom DescriptorProvider
DescriptorProviderCreating a custom Binding
Binding
Was this helpful?

