Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
2D toolkit incrasing performance
« previous
next »
Print
Pages: [
1
]
Author
Topic: 2D toolkit incrasing performance (Read 4961 times)
singh029
Newbie
Posts: 5
2D toolkit incrasing performance
«
on:
April 15, 2014, 05:10:10 pm »
Hey! So i wanted to create multiple levels for my 2d platformer. The only thing i was afraid of was the performance on mobile devices.
Is there a way to turn off (setactive = false) the tiles in a tilemap when off screen?
i.e. Pooling
Is there a way to access each tile programmatically or would that cost too much?
Thank you!
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: 2D toolkit incrasing performance
«
Reply #1 on:
April 16, 2014, 10:19:17 am »
It shouldn't be necessary. tk2d splits up tile map into chunks, and unity will cull those chunks when out of screen. It doesn't deal with 1000s of game objects at a time, but merges 1024 tiles into 1 chunk by default.
Logged
singh029
Newbie
Posts: 5
Re: 2D toolkit incrasing performance
«
Reply #2 on:
April 17, 2014, 10:18:03 pm »
Sweet! what if i set a prefab inside one of the tiles in the Data tab of the tilemap? do those also get culled?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: 2D toolkit incrasing performance
«
Reply #3 on:
April 18, 2014, 05:10:41 am »
They will get culled, but those should probably be turned off and on - check the tk2dTileMapDemoCoin code, it uses OnBecameInvisible, OnBecameVisible to turn off the animator when out of view
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
2D toolkit incrasing performance