I am rotating 3 cubes in Unity with Hybrid ECS and the code goes like this :
public class RoatateECS : MonoBehaviour {
public float moveSpeed = 10f;
}
class RotateSystem : ComponentSystem {
struct RoadComponets {
public Transform transform;
public RoatateECS rotateECS;
}
protected override void OnUpdate() {
foreach(var e in GetEntities<RoadComponets>()) {
e.transform.Rotate(0f, e.rotateECS.moveSpeed, 0f);
}
}
}
Inside OnUpdate all three cubes are rotating, I want to rotate the second cube in the opposite direction but how would I find a specific cube and modify it ?