Ahmad,
The preferred way to achieve this is to use the AvatarModels array.
For each avatar type that you need, create that avatar in the editor
in some area where they are not visible. Add this avatar to the Avatar
Models array. At runtime, instantiate a copy into the Avatars array.
This will allow you to initialize the models in the editor correctly
but instantiate them dynamically at runtime.
Here's an example that just instantiates avatar model 0 at runtime.
However, you could easily do this based on a string lookup from XML or
some other, dynamic method.
Session.Avatars.Clear();
Session.Avatars.Add((GameObject)Instantiate(Session.AvatarModels[0],
Vector3.zero, Quaternion.identity));
dba
On Jan 19, 9:28 am, "
ahmad2382...@yahoo.com" <
ahmad2382...@yahoo.com>
wrote: