Hello Guest

Author Topic: Bake Scale through editor script?  (Read 3948 times)

pete

  • Guest
Bake Scale through editor script?
« on: March 02, 2015, 10:26:21 am »
Hi there,

Just wondering if it's possible to bake the scale of a text element through the editor?
I have a script that is going through and cleaning things up for me and it would be really handy to have it bake the scale of any 2d toolkit components in my scene.

Thanks
Pete

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Bake Scale through editor script?
« Reply #1 on: March 02, 2015, 02:46:54 pm »
Yes, you just need to call tk2dScaleUtility.Bake on the objects that you want baked.

pete

  • Guest
Re: Bake Scale through editor script?
« Reply #2 on: March 02, 2015, 10:32:57 pm »
Awesome, Thanks!

pete

  • Guest
Re: Bake Scale through editor script?
« Reply #3 on: March 03, 2015, 08:38:44 am »
Ahhh sorry, looks like I spoke too soon. Just wondering, how do you actually use tk2dScaleUtility.Bake? I can't seem to find it in the docs...
Thanks
Pete

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Bake Scale through editor script?
« Reply #4 on: March 03, 2015, 08:54:01 am »
Its not in the docs, its an internal editor class :)
You basically call it with the transform you want to bake scale as the parameter.