Hi,
I found a very weird issue with the Hybrid Renderer. It will not render objects that are more than ~ -32785 units away from the center of the scene on the X-axis. There are no problems with any other axis.
Here are the scripts that I used:
Script for making prefab entities:
using Unity.Entities;
namespace UnityTemplateProjects
{
[GenerateAuthoringComponent]
public struct PrefabsEntityComponent:IComponentData
{
public Entity Prefab;
}
}
Script for spawning entities:
```csharp
*using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
namespace UnityTemplateProjects
{
public class PrefabSpawnerSystem:ComponentSystem
{
private bool _spawned = false;
protected override void OnUpdate()
{
if (_spawned) return;
var treesPrefabs = GetSingleton<PrefabsEntityComponent>();
var objects = EntityManager.Instantiate(treesPrefabs.Prefab, 128 * 128, Allocator.TempJob);
for (int y = 0; y < 128; y++)
{
for (int x = 0; x < 128; x++)
{
EntityManager.SetComponentData(objects[ y * 128 + x],
new Translation{Value = new float3(-(y * 128 + x) * 5, 0, 0)}); //Here is a problem at ~ -32785
//EntityManager.SetComponentData(objects[ y * 128 + x], new Translation{Value = new float3((y * 128 + x) * 5, 0, 0)}); // X Right - Fine
//EntityManager.SetComponentData(objects[ y * 128 + x], new Translation{Value = new float3(0, 0, (y * 128 + x) * 5)}); // Z Forward - Fine
//EntityManager.SetComponentData(objects[ y * 128 + x], new Translation{Value = new float3(0, 0, -(y * 128 + x) * 5)}); // Z Backward - Fine
//EntityManager.SetComponentData(objects[ y * 128 + x], new Translation{Value = new float3(0, -(y * 128 + x) * 5, 0)}); //Y Down - Fine
//EntityManager.SetComponentData(objects[ y * 128 + x], new Translation{Value = new float3(0, (y * 128 + x) * 5, 0)}); //Y Up - Fine
}
}
objects.Dispose();
_spawned = true;
}
}
}*
```
Does anyone know how to fix this?
Thank you in advance.