Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vkerkez

Pages: [1]
1
Support / Re: Scene Slows down to a crawl after a while
« on: October 10, 2013, 03:40:17 am »
Figured it out.

I got in touch with Unity. They let me have another free trail. I used the profiler and it showed me that my buttons were using a huge cpu percentage. I took a look at my classes and found out in my base class i was doing this:

in my Update(){
      uiItem.OnDown += ButtonDown;
      uiItem.OnUp += ButtonUp;

}

I was basically staking those classes per frame... which ended up throttling the entire cpu. Thank you again for everyone that took the time to read my posts and thank you 2dToolkit for your wonderful support.

2
Support / Re: Scene Slows down to a crawl after a while
« on: October 09, 2013, 06:20:46 pm »
Again thank you so much. I will let you know if I find a solution.

3
Support / Re: Scene Slows down to a crawl after a while
« on: October 09, 2013, 05:41:29 am »
So after investigating it some more.

Here is what the Xcode has to say:

Memory is growing really slowly... So i dont know if this is the real issue.

The Game starts at 30fps and the frame rate starts to go down hill from there as time passes. I am seeing something strange... It seems that the cpu slowly starts to get throttled staring at 34% and 30fps it goes up to 101% and 9fps.  It seems like the gpu is not used at all.

4
Support / Re: Scene Slows down to a crawl after a while
« on: October 09, 2013, 05:19:38 am »
Here is what im kind of doing:

I create random hills ever couple of seconds:
switch(type){
         case 0:
            Instantiate(backHill1, new Vector3(UnityEngine.Random.Range((start + SCREEN_WIDTH/2)-600, (start + SCREEN_WIDTH/2)+600), 380, 9), Quaternion.identity);
            break;
         
         case 1:
            Instantiate(backHill2, new Vector3(UnityEngine.Random.Range((start + SCREEN_WIDTH/2)-600, (start + SCREEN_WIDTH/2)+600), 380, 9), Quaternion.identity);
            break;
         case 2:
            Instantiate(backHill3, new Vector3(start, 380, 9), Quaternion.identity);
            break;
         
         case 3:
            Instantiate(backHill4, new Vector3(start,380, 9), Quaternion.identity);
            break;
         case 4:
            Instantiate(backHill5, new Vector3(start, 380, 9), Quaternion.identity);
            break;
         case 5:
            Instantiate(backHill6, new Vector3(UnityEngine.Random.Range((start + SCREEN_WIDTH/2)-600, (start + SCREEN_WIDTH/2)+600), 380, 9), Quaternion.identity);
            break;
         default:
            break;
         
      }

The object itself has a script  and once the object reaches the end of the screen i am trying:

            Destroy(this.gameObject);
            
            Resources.UnloadUnusedAssets();
            System.GC.Collect();

still the game after 2-3 minutes begins to slow donw

5
Support / Re: Scene Slows down to a crawl after a while
« on: October 09, 2013, 04:16:58 am »
I checked through and made sure nothing has a reference but the game continues to get slower over time. After 2-3 minutes it begins to get slower and slower.

Not sure what I am doing wrong.

6
Support / Re: Scene Slows down to a crawl after a while
« on: October 09, 2013, 03:32:21 am »
Hello here is error i got:

Asset import did not unload metadata path. This will leak memory. File a bug with repro steps please.
UnityEditor.AssetDatabase:ImportAsset(String)
tk2dSpriteCollectionBuilder:SetUpSourceTextureFormats(tk2dSpriteCollection) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:233)
tk2dSpriteCollectionBuilder:Rebuild(tk2dSpriteCollection) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:638)
tk2dSpriteCollectionEditorPopup:Commit() (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:447)
tk2dSpriteCollectionEditorPopup:DrawToolbar() (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:437)
tk2dSpriteCollectionEditorPopup:OnGUI() (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:836)
UnityEditor.DockArea:OnGUI()

7
Support / Re: Scene Slows down to a crawl after a while
« on: October 08, 2013, 07:25:54 pm »
I can post the exact error message when I get home. I will let you know. I wanted to thank you for fast response time and the great help you are providing. I am very pleased with my purchase. I am sure it has something to do with me, I am making a mistake somewhere.

I will post more info later today.

Thank you again.

8
Support / Re: Scene Slows down to a crawl after a while
« on: October 08, 2013, 07:13:37 pm »
When I create my sprite collection. I get an a error about it leaking memory when i press commit "This will leak memory" in the console. Is this normal behavior?

9
Support / Re: Scene Slows down to a crawl after a while
« on: October 08, 2013, 07:09:33 pm »
I believe the Unity Profiler is only for Pro version. I do not own that. Are there any other tools I could take a look at?

thank you

10
Support / Re: Scene Slows down to a crawl after a while
« on: October 08, 2013, 06:05:53 pm »
Should  I be calling System.GC.Collect(); everyonce in a while?

11
Support / Scene Slows down to a crawl after a while
« on: October 08, 2013, 06:02:30 pm »
Hello,

I am working on a small endless 2d runner. In the background I have 2-3 layers with hills. These hills get created offscreen as a prefab (clone) to the right and then slide in throughout the scene. When they reach a certain point off the screen to the left I call Destroy(this.gameobject);  I can see it being destroyed. Everything looks good. After about 2-3 minutes into the game everything begins to slow down to a crawl on my iphone 5. The game starts rendering slower and slower. My first gut feeling tells me I have a memory leak.  Am I doing something wrong? Is there another way of destroying the objects?

On another note when I create collections and commit my png's I get an error that it will leak memory, but the collection is fine. I assumed this might be just in Unity or is fine.

Thank you for any input. If you require any other information I can provide let me know.


12
Support / Re: Rendering Sprite within A box
« on: October 08, 2013, 05:52:11 pm »
I will try this.  Thank you for your help.

13
Support / Re: Rendering Sprite within A box
« on: September 29, 2013, 06:03:26 am »
Here is an example im trying to do:

http://shokzsc.com/2011/08/

Instead of a circular area it will be a square, I will have a background and move a foggy texture in repeat over it.

Is this possible? Thank you so much for your help.

14
Support / Rendering Sprite within A box
« on: September 29, 2013, 05:51:08 am »
Hello All,

I am working on something that is driving me crazy. I have a sprite that is 140 wide and 100 tall. I would like to add another sprite or 2 on top of it but within is bounds. Ex: if my object is is 120 tall only 100 will show. I understand there is a clipped sprite however I am looking to animate a large texture 500x500 within my 140 by 100 viewport.  What would be the best way to achieve something like this?

thanks

Pages: [1]