Esempio n. 1
0
        public override void UpdateComponent()
        {
            if (PYBundleManager.Instance.IsReady)
            {
                foreach (PYPlayer player in Audios)
                {
                    if (player is PYPlayerClip)
                    {
                        PYPlayerClip playerClip = (PYPlayerClip)player;
                        if (!playerClip.UpdateData.UpdateFromBundle)
                        {
                            continue;
                        }

                        playerClip.UpdateData.DefaultComponentValue = playerClip.Clip;

                        AudioClip bundleClip = PYComponentBundle.GetAsset <AudioClip>(playerClip.UpdateData.BundlesToCheck, playerClip.AssetTag.Tag);
                        if (bundleClip != null)
                        {
                            playerClip.Clip = bundleClip;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 public T GetAsset <T>(string assetTag)
 {
     return(PYComponentBundle.GetAsset <T>(UpdateData.BundlesToCheck, assetTag));
 }