void IncludeDependentWriteGroups(ComponentType type, NativeList <ComponentType> explicitList) { if (type.AccessModeType != ComponentType.AccessMode.ReadOnly) { return; } var writeGroupTypes = TypeManager.GetWriteGroupTypes(type.TypeIndex); for (int i = 0; i < writeGroupTypes.Length; i++) { var excludedComponentType = GetWriteGroupReadOnlyComponentType(writeGroupTypes, i); if (explicitList.Contains(excludedComponentType)) { continue; } explicitList.Add(excludedComponentType); IncludeDependentWriteGroups(excludedComponentType, explicitList); } }