Hello Guest

Author Topic: Stop tk2d auto refresh  (Read 4470 times)

subzaku

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Stop tk2d auto refresh
« on: April 17, 2017, 10:00:48 am »
Hi, i'm having trouble using tk2d when my assets is already so big and so many collections, everytime unity do refresh even just change script i need to wait 20-30 seconds. after experimenting i found that the problem is -tk2d.asset (i tried build new project, add all the script without the asset and the problem is gone)

i already uncheck the auto update on tk2dpreference
i tried commenting the auto rebuild function in tk2dAutoRebuild but it didn't do anything.
so i wonder can i stop the -tk2d.asset do auto check asset whenever unity is refreshing asset?
Thanks
« Last Edit: April 17, 2017, 10:43:22 am by subzaku »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Stop tk2d auto refresh
« Reply #1 on: April 17, 2017, 06:29:09 pm »
How did you narrow it down to that single asset? With autoRebuild turned off, the monitoring doesn't do anything (tk2dSpriteCollectionTextureWatcher is where this happens).

tk2dAutoRebuild only changes things after play state changes, so it can't be that either.

Its probably worth taking a profiler to see what is the largest thing that happens when one of your assets changes. That should narrow it down if it is a tk2d component that is causing the slowdown.

subzaku

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Stop tk2d auto refresh
« Reply #2 on: April 17, 2017, 08:14:55 pm »
i tried to build new project and remove the collection, the loading time without the huge collection is fast under 3 seconds.

from editor profiler the problem is on

Flush Dirty and
UpdateSceneIfNeeded -> tk2dsprite.OnDrawGizmos

is there anything i can do? Thanks
« Last Edit: April 17, 2017, 08:22:58 pm by subzaku »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Stop tk2d auto refresh
« Reply #3 on: April 17, 2017, 08:52:55 pm »
You can comment out OnDrawGizmos in tk2dSprite, see if that speeds it up?
No idea what Flush dirty is - how complex is your scene?