Best performance on mobiles
Hi,
I'm lost a bit finding out the best strategy to get the best performance on mobiles (unity3d). May be you can help me. I've got the following questions:
At the moment I'm using prefabs in unity to add different gui objects to the scenes. Therefore I add a camera, a "Noesis GUIPanel" component and a script (code behind) to a prefab. This leads to having multiple "Noesis GUIPanels" (and cameras) in the scene. Will this affect the performance drastically? Is this the proper workflow or is there a better way if I want to add different GUI-objects to the scene? (in different XAML-files). Or is it advisable to use only one XAML in the scene?
Is it better to use "DoubleAnimationUsingKeyFrames" or just "DoubleAnimation"? Is there a big difference concerning performance?
At the moment I'm using "DoubleAnimationUsingKeyFrames" to move a grid containing other elements into the screen (menu). I trigger the storyboard in the code behind (view model) several times. The first and second time it runs very smoothly, but the third time it gets stuck a bit. It is not dramatical, but I have no explanation for this. Do I have to un- or reload the storyboard in some way? Or what could be the reason for this? (tested on iPhone 5).
Are there other general advices to improve the performance on mobiles?
Thanks for your help!
I'm lost a bit finding out the best strategy to get the best performance on mobiles (unity3d). May be you can help me. I've got the following questions:
At the moment I'm using prefabs in unity to add different gui objects to the scenes. Therefore I add a camera, a "Noesis GUIPanel" component and a script (code behind) to a prefab. This leads to having multiple "Noesis GUIPanels" (and cameras) in the scene. Will this affect the performance drastically? Is this the proper workflow or is there a better way if I want to add different GUI-objects to the scene? (in different XAML-files). Or is it advisable to use only one XAML in the scene?
Is it better to use "DoubleAnimationUsingKeyFrames" or just "DoubleAnimation"? Is there a big difference concerning performance?
At the moment I'm using "DoubleAnimationUsingKeyFrames" to move a grid containing other elements into the screen (menu). I trigger the storyboard in the code behind (view model) several times. The first and second time it runs very smoothly, but the third time it gets stuck a bit. It is not dramatical, but I have no explanation for this. Do I have to un- or reload the storyboard in some way? Or what could be the reason for this? (tested on iPhone 5).
Code: Select all
<Storyboard x:Key="MoveInAnswer">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="AnswerContainerGrid">
<EasingDoubleKeyFrame KeyTime="0" Value="-570"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
Thanks for your help!
Re: Best performance on mobiles
Although having multiple Noesis Panels does not affect performance (in fact it could increase it because each panel is processed in parallel) it increases the memory consumption. This is something we want to reevaluate in future versions and document properly.At the moment I'm using prefabs in unity to add different gui objects to the scenes. Therefore I add a camera, a "Noesis GUIPanel" component and a script (code behind) to a prefab. This leads to having multiple "Noesis GUIPanels" (and cameras) in the scene. Will this affect the performance drastically? Is this the proper workflow or is there a better way if I want to add different GUI-objects to the scene? (in different XAML-files). Or is it advisable to use only one XAML in the scene?
Right now, the alternative to having several components is having a single one using as root xaml with an empty container, a Grid for example. Each prefab would have a xaml but not a camera. And each time you want to display it you add it to the root container. This is good not only because it consumes less resources, it also allows you to create transition between each xaml.
You should get a similar performance.Is it better to use "DoubleAnimationUsingKeyFrames" or just "DoubleAnimation"? Is there a big difference concerning performance?
Having a spike the third time your execute the storyboard is really strange. Could you create a small scene with this problem and file us a bug? We can investigate it to understand what is going on.At the moment I'm using "DoubleAnimationUsingKeyFrames" to move a grid containing other elements into the screen (menu). I trigger the storyboard in the code behind (view model) several times. The first and second time it runs very smoothly, but the third time it gets stuck a bit. It is not dramatical, but I have no explanation for this. Do I have to un- or reload the storyboard in some way? Or what could be the reason for this? (tested on iPhone 5).
Yes, the Optimizing NoesisGUI Performance document explains more things. Please, have a look at it and if you have more doubts tell us here. That document will be updated in future revisions.Are there other general advices to improve the performance on mobiles?
Who is online
Users browsing this forum: Baidu [Spider] and 5 guests