Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - XpandeR

Pages: [1]
1
Support / Re: Runtime scale all sprites in specific atlas
« on: October 20, 2013, 10:41:37 pm »
Ok, it seems I need to go second way with the cameras.

Thank you.

2
Support / Re: Runtime scale all sprites in specific atlas
« on: October 20, 2013, 10:26:23 pm »
Quote
Is there any particular reason you're trying to do this?

I have a universal build for phones and tablets. There are 2 cameras: for UI and for World. Scale should be different on tablet and on phone. Most of work is done fine by resolution overrides + zoom on cameras. However part (not all) of UI sprites need to be scaled differently than other UI on the tablet. I already have these specific sprites in a separate sprite collection.

Solutions I see:
1. Scale single UI sprite collection. I already checked this, by settings scale directly in sprite collection and this works fine. But it works in editor and I need it in runtime.
2. Add 3rd camera for these sprites and zoom the camera.

The 1st solution is preferable, because the project is 90% complete and there is a risk to break something, trying to add new camera and split UI sprites on 2 cameras.
I.e. second solution requires more work (I guess) and contains more risks.

3
Support / Re: Audio Volume
« on: October 20, 2013, 09:10:31 pm »
Quote
(too bad that can't be done as a mass operation :-/ -- I have a lot of audio pieces...)

You can do this for all sounds by implementing custom import preprocessor. Once this is done, you can reimport all existing audio. For new files, it will be set by default.

Something like this (save as ImportPreProcessor.cs and put into folder called Editor):

Code: [Select]
public class ImportPreProcessor : AssetPostprocessor
{
    private void OnPreprocessAudio()
    {
        var audioImporter = (AudioImporter)assetImporter;
        audioImporter.threeD = false;
    }
}

4
Support / Runtime scale all sprites in specific atlas
« on: October 20, 2013, 08:56:00 pm »
Hello.
Is it possible to scale all sprites belonging to specific atlas in runtime?
I know, it is possible to scale each sprite in runtime, but I'm looking a generic atlas-side solution for this. So that I will not need to update the code each time I add new sprite to  this collection.

Pages: [1]