Esempio n. 1
0
 void OnEffectQualityChange()
 {
     if (!effectGo)
     {
         return;
     }
     if (!bOptimitzed)
     {
         hostNode.StopEffect();
         hostNode.PlayEffect();
     }
 }
Esempio n. 2
0
    public override void OnAwake(Camera sceneCamera)
    {
        EffectRes = AssetBundleManager.GetAssets(AssetType.Asset_Prefab, assetGUID, true);


        if (null == EffectRes)
        {
            return;
        }

        hostNode = EffectRes.InstanceMainRes <Effect.EffectNodeBase>();
        if (!hostNode)
        {
            AssetBundleManager.DeleteAssets(ref EffectRes, true);
            enabled = false;
            return;
        }
        effectGo = hostNode.gameObject;
        effectGo.transform.SetParent(EffectParent);
        effectGo.transform.position   = EffectPosition;
        effectGo.transform.rotation   = EffectRoation;
        effectGo.transform.localScale = EffectScale;
        hostNode.PlayOnAwake          = false;
        hostNode.isStaticEffect       = false;
        hostNode.Init();
        hostNode.StopEffect();
        Effect.EffectNodeBase.ResigterEffectQualityChange(OnEffectQualityChange);
    }