Best performance on mobiles
Posted: 30 Oct 2014, 16:28
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!