Astra Unity 2.6.6
Astra Unity Plugin
Astra.Examples.ManyAvatarsController Class Reference

This example demonstrates some of the techniques to be able to load many avatars at the same time more efficiently More...

Inheritance diagram for Astra.Examples.ManyAvatarsController:

Public Member Functions

Vector3 GetRandomWaypoint ()
 

Public Attributes

TextAsset appConfig
 
Button simpleAvatarButton
 
Button randomAvatarButton
 
Button simple32AvatarsButton
 
Button random32AvatarsButton
 
Button clearCacheButton
 
Text loadProgressText
 
Text loadTimeText
 
Canvas uiCanvas
 
Camera mainCamera
 
Camera loadingCamera
 
Transform avatarContainer
 
GameObject avatarPrefab
 
RuntimeAnimatorController runtimeController
 
List< GameObject > waypoints
 
List< string > maleHairstyles
 
List< string > femaleHairstyles
 
List< string > maleTops
 
List< string > femaleTops
 
List< string > maleBottoms
 
List< string > femaleBottoms
 
List< string > maleShoes
 
List< string > femaleShoes
 

Detailed Description

This example demonstrates some of the techniques to be able to load many avatars at the same time more efficiently

Things that primarily affect avatar loading time are whether assets are currently installed in the cache that Astra uses, the size of the assets themselves. The first time you load a given asset, it will take much longer, as the asset is being downloaded from the back end and then installed into the Astra Cache.

Textures are by far the biggest impact to memory footprint, hence the setting below to use no more than 512x512 textures (some asset textures are much larger). This setting is: FeatureDetection.OverridePreferredTextureMaxSize(512); Care should be taken that textures for assets are compressed. If they are uncompressed their size will be unreasonably large, and will be a problem to load on mobile devices without hitting app memory restraints.


The documentation for this class was generated from the following file: