public UnityApiType AddType(string ns, string name, string kind, string docPath, Version apiVersion)
{
UpdateSupportedVersion(apiVersion);
foreach (var type in myTypes)
{
if (type.Namespace == ns && type.Name == name)
{
// We don't actually use kind, but let's be aware of any issues
if (type.Kind != kind)
{
Console.WriteLine($"WARNING: Kind has changed from `{type.Kind}` to `{kind}` for `{name}`");
}
return type;
}
}
var unityApiType = new UnityApiType(ns, name, kind, docPath, apiVersion);
myTypes.Add(unityApiType);
return unityApiType;
}