- Home /
 
Android lag
My game lags really badly on android. I've searched all over the net for a solution but I couldn't find one.I have around 40 objects transforming at the same time. They come from a pool and use this script to move :
  public var waypointArray1 : Transform[];
      public var rotation : float = 1.0f;
      var t : float;
  
      function Update () 
      {
  
          transform.position = Spline.InterpConstantSpeed(waypointArray1, t, EasingType.Linear , true, true);
      t += Time.deltaTime * 0.2;
          transform.Rotate (0, rotation, 0);
  
      } 
      function OnTriggerEnter(collider : Collider)
   {
       if(collider.tag == "destroyer")///go back to start after spawn
       {
       t = 0;
      gameObject.transform.eulerAngles = new Vector3(0,273,0);
       }
   }
 
               Here's what my profiler shows while on android. 
It looks like the rendering =is causing a problem but I dont know how to fix it. The scripts are so high because many objects are in the scene using it to transform.
 
                 
                screen-shot-2016-06-01-at-75125-pm.png 
                (252.8 kB) 
               
 
              
               Comment
              
 
               
              Your answer