GenericDataContainer
0.2.2 ・ Public
GenericDataContainer
A generic and type-safe wrapper for DataContainer.
Installation
To use this package, you need to add my package repository. Please read more details here.
Please install this package with Creator Companion or VPM CLI.
Creator Companion
-
Enable the
koyashiropackage repository.
-
Find
GenericDataContainerfrom the list of packages and install any version you want.
VPM CLI
-
Execute the following command to install the package.
vpm add package net.koyashiro.genericdatacontainer
DataList<T>
Example
using UnityEngine;
using UdonSharp;
using Koyashiro.GenericDataContainer;
public class DataListExample : UdonSharpBehaviour
{
public void Start()
{
DataList<int> list = DataList<int>.New();
list.Add(100);
list.Add(200);
list.Add(300);
Debug.Log(list.GetValue(0)); // 100
Debug.Log(list.GetValue(1)); // 200
Debug.Log(list.GetValue(2)); // 300
int[] array = list.ToArray();
}
}
DataDictionary<TKey, TValue>
Example
using UnityEngine;
using UdonSharp;
using Koyashiro.GenericDataContainer;
public class DataDictionaryExample : UdonSharpBehaviour
{
public void Start()
{
DataDictionary<string, int> dic = DataDictionary<string, int>.New();
dic.SetValue("first", 100);
dic.SetValue("second", 200);
dic.SetValue("third", 300);
Debug.Log(dic.GetValue("first")); // 100
Debug.Log(dic.GetValue("second")); // 200
Debug.Log(dic.GetValue("third")); // 300
}
}
Keywords
No keywords found.Install via VCC
Package ID
net.koyashiro.genericdatacontainerUnity Version
undefinedUnity Release
undefinedVRChat Version
undefinedAuthor
License
MIT
Documentation URL
undefined
Changelog URL
undefined