public static GameObject CreateGameObjectWithHideFlags(string name, HideFlags flags, params Type[] components)
{
GameObject obj2 = Internal_CreateGameObjectWithHideFlags(name, flags);
obj2.AddComponent(typeof(Transform));
foreach (Type type in components)
{
obj2.AddComponent(type);
}
return obj2;
}