public void AddResource(ARResource resource) { if (resource == null) { throw new ArgumentNullException("resource"); } if (m_Resources.Contains(resource)) { throw new InvalidOperationException(string.Format("Duplicate resource '{0}` in group '{1}'", resource.name, name)); } m_Resources.Add(resource); }
public void AddResource(ARResource resource) { if (resource == null) { throw new ArgumentNullException(nameof(resource)); } if (m_Resources.Contains(resource)) { throw new InvalidOperationException($"Duplicate resource '{resource.name}` in group '{name}'"); } m_Resources.Add(resource); }