void DestroyBehavior(ref LightingEffectBehavior instance)
    {
        if (!isValid)
        {
            return;
        }
        RemoveFromEntityEffectTable(instance);

        LightingEffectResHandleInstance temp = instance.ResourceHandle;

        DeleteResourceHandleAsync(ref temp, instance.OnResourcesLoadFinish);
        DeleteBehaviorTransformAgent(instance.TransformAgent);
        instance.ClearData();
        instance.ResetAllMembers();
        instance.SetInvalid();
        instance = null;
    }
    public void ResetBehavior(LightingEffectBehavior instance)
    {
        if (!isValid)
        {
            return;
        }
        if (null == instance)
        {
            return;
        }
        int effectID = instance.getID();

        if (effectID > 0)
        {
            LightingEffectResHandle handle = AllocResourcesHandle(instance.getID());
            handle.CacheInstance(instance.ResourceHandle, EffectCacheRoot.transform, CachePos);
            handle.Release();
        }

        DeleteBehaviorTransformAgent(instance.TransformAgent);
        //CacheBehaviorDestroyTimer(instance.BehaviorDestroyTimer);
        instance.ResetAllMembers();
        instance.SetInvalid();
    }