Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Liquid Volume by Kronnect

Discussion in 'Assets and Asset Store' started by Kronnect, Sep 20, 2016.

  1. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,875
    Hi, no. Only builtin and URP (the Pro version).
     
  2. edmccreary

    edmccreary

    Joined:
    Dec 18, 2021
    Posts:
    2
    I am having a weird issue when I try to control a spherical flask of liquid via a script. Every other frame the component variable "p1_red_liquid" is NULL for some reason. Here is the entire script:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using LiquidVolumeFX;
    5.  
    6. public class StageHUD : MonoBehaviour
    7. {
    8.     public LiquidVolume p1_red_liquid;
    9.  
    10.     private void Update()
    11.     {
    12.         if(p1_red_liquid != null)
    13.         {
    14.             p1_red_liquid.level = 0.5f;
    15.             Debug.Log("RED LIQUID IS NOT NULL");
    16.         }
    17.         else
    18.         {
    19.             Debug.Log("RED LIQUID IS NULL..............");
    20.         }
    21.            
    22.     }
    23. }
    24.  
    upload_2022-7-8_17-57-46.png
    This is what I get in the output window when I run the code. I am not running any other scripts to control this Liquid Volume component. Have you seen this behavior before? I am not sure what to do about this.
     
  3. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,875
    Do you have that script duplicated somewhere? Try disabling it in the inspector and check if the console still shows those messages.
     
  4. edmccreary

    edmccreary

    Joined:
    Dec 18, 2021
    Posts:
    2
    That was the problem, I didn't realize I had the script on another object. Thanks so much for the quick reply!
     
    Kronnect likes this.
  5. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    303
    Hello, Im getting some errors when compiling the Shaders
    Code (CSharp):
    1. ERROR: Shader error in 'LiquidVolume/Default': undeclared identifier 'sampler_CameraDepthTexture' at Assets/LiquidVolume/Resources/Shaders/LVBlurPass.cginc(56)
    2. Shader error in 'LiquidVolume/Default': undeclared identifier 'sampler_CameraDepthTexture' at Assets/LiquidVolume/Resources/Shaders/LVLiquidPassBase.cginc(205) (on d3d11)
    3.  
    Thanks for any help
     
  6. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,875
    Hi!
    Are you using latest version? Is it the Pro version? Builtin or URP?
    Also, please specify the Unity version you’re using.
    Thanks.