Hello all, spawning 200,000 disabled cubes (this means transform, boxcollider, meshfilter, meshrenderer )in the editor will not have any performance impact, but when we try the same thing in the game, we run at 27 fps, while the default is 90.
The world for the test (empty plane with canvas, button, and text field, pressing button spawns 1000 objects.
Code used to create the issue (udon sharp)
public class InstanciateFPScCheck : UdonSharpBehaviour
{
/// <summary>
/// The dissabled cube with meshfilter, boxcollider, meshrenderer, transform
/// </summary>
public GameObject Empty;
/// <summary>
/// holder transform for orginization
/// </summary>
public Transform holder;
/// <summary>
/// text for displaying the amount of objects
/// </summary>
public Text text;
/// <summary>
/// event when button clicked
/// </summary>
public void OnClick()
{
for(int i = 0; i < 1000; i++)
{
GameObject go = VRCInstantiate(Empty);
go.transform.SetParent(holder);
}
text.text = holder.childCount.ToString();
}
}