Hello Guest

Author Topic: Sprite From Texture + Multiple platforms  (Read 3584 times)

redeyesofnight

  • Newbie
  • *
  • Posts: 2
    • View Profile
Sprite From Texture + Multiple platforms
« on: August 24, 2013, 11:42:49 pm »
Hi there!
I'm just starting out with Toolkit 2D, and I was wondering if there was a good way to do Sprite From Texture with multiple platforms.

The specific setup I'm working with is this:
I've got multiple large backgrounds (No repeats) that I'm loading from prefabs at runtime.
I've got 1x and 2x versions for all the backgrounds, and I'd love to use the platform switching (which is working great for all my atlased sprites).

Any recommendations for this?

Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite From Texture + Multiple platforms
« Reply #1 on: August 25, 2013, 10:18:59 am »
No there isn't right now. The problem is it requires you to load the image using Resources.Load or other means, which means it can't "simply work" like the rest of the platform system which has full control of the pipeline. If you put the file in a resources folder and load it in manually, you can simply assign it using the texture field and calling ForceBuild().

redeyesofnight

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Sprite From Texture + Multiple platforms
« Reply #2 on: August 26, 2013, 01:00:29 am »
Thanks for the response!
That solution makes sense, and shouldn't be much extra trouble :)

I'll test it out and get back if I have any other questions!

Cheers.