private static void ExtractGlobalMatrixArray(int name, List <Matrix4x4> values) { if (values == null) { throw new ArgumentNullException("values"); } values.Clear(); int globalMatrixArrayCountImpl = Shader.GetGlobalMatrixArrayCountImpl(name); if (globalMatrixArrayCountImpl > 0) { NoAllocHelpers.EnsureListElemCount <Matrix4x4>(values, globalMatrixArrayCountImpl); Shader.ExtractGlobalMatrixArrayImpl(name, (Matrix4x4[])NoAllocHelpers.ExtractArrayFromList(values)); } }