Game.Rendering.WaterPipePropertiesDebug
Assembly: Assembly-CSharp
Namespace: Game.Rendering
Type: public class
Base: UnityEngine.ScriptableObject
Summary:
Holds debug rendering assets for visualizing flow in water pipes. This ScriptableObject stores a Material used to render flow effects and a Mesh used as the flow geometry. Intended for debugging/visualization of water pipe flow in the renderer; instances are typically created as assets in the editor or created at runtime with ScriptableObject.CreateInstance
Fields
-
public UnityEngine.Material m_FlowMaterial
Material used to render the flow effect (shader, textures, etc.). Assign a material compatible with the flow mesh and the renderer that draws the flow. -
public UnityEngine.Mesh m_FlowMesh
Mesh used to draw the flow geometry (e.g., a simple quad or tube mesh representing moving water). Assign a Mesh that matches the intended flow visual.
Properties
- None. (This class exposes public fields which Unity will serialize; there are no C# properties.)
Constructors
public WaterPipePropertiesDebug()
Implicit parameterless constructor provided by Unity. Do not use new; create instances via ScriptableObject.CreateInstance() or create an asset in the Editor.
Methods
- None. (No custom methods are defined on this ScriptableObject.)
Usage Example
Create an instance at runtime:
var debugProps = ScriptableObject.CreateInstance<Game.Rendering.WaterPipePropertiesDebug>();
debugProps.m_FlowMaterial = someFlowMaterial;
debugProps.m_FlowMesh = someFlowMesh;
// Use with Graphics or a custom renderer:
Graphics.DrawMesh(debugProps.m_FlowMesh, Matrix4x4.TRS(position, rotation, scale), debugProps.m_FlowMaterial, 0);
Create and save an asset in the Editor:
#if UNITY_EDITOR
using UnityEditor;
var asset = ScriptableObject.CreateInstance<Game.Rendering.WaterPipePropertiesDebug>();
asset.m_FlowMaterial = myEditorMaterial;
asset.m_FlowMesh = myEditorMesh;
AssetDatabase.CreateAsset(asset, "Assets/WaterPipePropertiesDebug.asset");
AssetDatabase.SaveAssets();
#endif
Notes: - Fields are serialized by Unity; assign assets in the inspector or via code. - Being a debug helper, this object typically does not contain runtime logic — it's a data container for materials/meshes used by the water pipe debug renderer.