コード例 #1
0
        // Updates the UMA avator attached to this game object
        private void CreateAndSpawnUMA(string _selectedUma)
        {
            UMADynamicAvatar thisUmaDynamicAvator = gameObject.GetComponent <UMADynamicAvatar>();

            //Create a UMA avator and bind it to the DynamicAvator of this object
            UMAGenericHelper.createUMAAvator(AssetLoaderController,
                                             _selectedUma,
                                             thisUmaDynamicAvator,
                                             AvatorController_OnCharacterCreated);
        }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        //Load the asset containing all the uma's generated in the editor
        AssetLoaderController.CacheAllUMA(CommonNames.assetsNameStreamingFolder);

        //Create and spawn all the uma's
        createdUmas = UMAGenericHelper.SpawnAllAvator(createdUmas,
                                                      AssetLoaderController,
                                                      CommonNames.avators,
                                                      null,
                                                      Vector3.zero,
                                                      Quaternion.Euler(0, 180, 0),
                                                      x =>
        {
            //Deactivate shadows production and reception
            x.gameObject.GetComponentInChildren <SkinnedMeshRenderer>().shadowCastingMode =
                UnityEngine.Rendering.ShadowCastingMode.On;
            x.gameObject.GetComponentInChildren <SkinnedMeshRenderer>().receiveShadows = false;
        });

        ////Deactivate all the uma's execept the first
        UMAGenericHelper.ToggleUmasActivation(createdUmas, 0);
    }
コード例 #3
0
 /* Apply to the uma's array a verse of scrolling and return the name
  * of the asset of the selected uma.
  * */
 public string ChangeUMA(VERSE verse)
 {
     currentIndexOfTheSelection = ApplyVerse(verse, currentIndexOfTheSelection);
     return(UMAGenericHelper.ToggleUmasActivation(createdUmas, currentIndexOfTheSelection).gameObject.name);
 }