Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FPS drop due to "OVERHEAD"

Discussion in 'Scripting' started by richard_indianic, Mar 29, 2013.

  1. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    Fps is going rapidly down ,while i am shooting, i am not instanitate the bullet at runtime.. i am just repositioning it.
    I dont know why i am getting overhead.!!


    :confused:HELP PLZ...
     
  2. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    Need more info. Are you using a sendMessage or broadcastMessage at any stage?
     
  3. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    No, not at all..!! What is overhead? and why its occuring?? overhead is comimg in iphone 4 but not in iphone4s?
     
  4. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    Can you profile your code?
     
  5. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    You mean the profiler ?
     
  6. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    yeah. What happens when you get this overhead? Can we see the relevant scripts for your shooting?
     
  7. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    No, No relavant scripts are running in peak.. camera render,physics and overhead are the things going peak.
    Even in some case, Overhead is coming without shooting as well :/ if it comes it occupies 60 to 70%
     
    Last edited: Mar 29, 2013
  8. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    But then what's going on in the game? There must be a shooting script or something creating gameplay!

    Consistent overhead issues are usually caused bybad code.

    However have you tried: closing the scene view
    Restarting Unity
    dealing with any errors you're having

    We're going to need to see some code.
     
  9. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    I am having doubt of whether its happening due to shooting.!!! Overhead occurs due to bad code? what kind of bad? So that i can work on that progress
     
  10. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    Richard to be able to help you more I'll need to see what scripts you have running and a better explanation of what is going on in the scene when the overhead starts getting bad.

    Please tell us what scripts you have running at the time, what the tri count is in the scene and the number of draw calls
     
  11. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    Draw calls is about 35-50.
    tri count is 50-200
    Its a 2d tank game, i am using virtual joystick as input and some ai tanks with 3 raycast on them and player tank. its like a top down camera view.
    Overhead is keep on coming at a regular time interval.
     
  12. BPPHarv

    BPPHarv

    Joined:
    Jun 9, 2012
    Posts:
    318
    The error is on line 4.
     
  13. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
  14. coAdjoint

    coAdjoint

    Joined:
    Jul 18, 2012
    Posts:
    162
    Please send scripts or I won't be able to help!
     
  15. joshimoo

    joshimoo

    Joined:
    Jun 23, 2011
    Posts:
    266
    Have you made sure that you attached a rigidbody to all colliders that are not static (moving colliders)?
    Please also attach a screenshot from your profiler output to this thread.
     
  16. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    If you don't show your code, all your going to get for answers are guesses. Post your code, you will get help.
     
  17. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    $Screen Shot 2013-03-30 at 10.40.27 AM.png

    check this profile..!!!
    Only overhead goes peak at regular interval
     
  18. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    is your scene window open at the same time as the game window when you are profiling?
     
  19. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    Game is running in my iphone..!!! is that related with editors scene window?
     
  20. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    no, only relative if the game view and scene view in the editor is open at the same time and the game is running in the editor.
     
  21. richard_indianic

    richard_indianic

    Joined:
    Mar 29, 2013
    Posts:
    11
    the profiler i upload above is shows the profile of my game running in iphone...