Hello Guest

Author Topic: Can i get sprite box custom collider size&offset by script??  (Read 4365 times)

Magris

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Can i get sprite box custom collider size&offset by script??
« on: March 19, 2015, 03:31:30 pm »
I used sprite box custom collider(Weapon)

so i changed sprite then collider change together(i set each weapon sprite different box custom collider)

but sometimes not changed collider

when this time occured, i re commit weapon sprite collection and it works again.

but i dont want to do this every time.

so how can i fix it? or need update??

or can i access box custom collider value???

i use unity5 and latest version tk2d

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can i get sprite box custom collider size&offset by script??
« Reply #1 on: March 21, 2015, 11:30:28 pm »
Hi there,
This should work fine. Please post a repro and I'll investigate it.

Magris

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can i get sprite box custom collider size&offset by script??
« Reply #2 on: March 26, 2015, 11:55:40 am »
Sometimes  in editor scene tk2dsprite invisible( Rebuild All Sprites click and visible again but)

when that time

i think tk2d index broken(something wrong in tk2d collection)

so not update box custom collider(as i said)

and i rebuild index then it works again


i dont want to do this every time

how can i fix it?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can i get sprite box custom collider size&offset by script??
« Reply #3 on: March 26, 2015, 06:10:17 pm »
The index should not be broken. I think you'll need to work out why thats happening - eg. is stuff not getting checked into version control correctly, etc...

Magris

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can i get sprite box custom collider size&offset by script??
« Reply #4 on: March 27, 2015, 06:50:04 am »
this happen when edit animator or animation

when edit animation(not tk2d animation) sometimes tk2dsprite invisible(i said)

and occured what i said


this problem solved when i click tk2d 'Rebuild Index' menu

but this problem occured again & again
« Last Edit: March 27, 2015, 06:54:13 am by Magris »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can i get sprite box custom collider size&offset by script??
« Reply #5 on: March 28, 2015, 03:11:32 pm »
Can you try to create a minimal repro case for this? I have not seen this happen at all.