|
@@ -65,7 +65,7 @@ namespace ET.Client
|
|
|
|
|
|
go = await GameObjectPool.Instance.Acquire("Effect_" + effect.Name);
|
|
|
var timeComponent = go.GetComponent<EffectTime>();
|
|
|
- if (time == 0f) time = timeComponent.duration;
|
|
|
+ if (time == 0f) time = timeComponent != null ? timeComponent.duration : EffectPlayInfo.TIME_DEFAULT;
|
|
|
if (time < 0f) time = EffectPlayInfo.TIME_FOREVER;
|
|
|
setupEffect(go, effect, render, pos, rotation);
|
|
|
}
|