From 56e1a5a4811538bccd301302fdf5cc46303ce866 Mon Sep 17 00:00:00 2001 From: Nicola Piccinelli Date: Wed, 16 May 2018 20:46:01 +0200 Subject: [PATCH] Added properties to access point and disk shader I've extended your project to render a point cloud received in realtime from ROS. During the creation of that point cloud the point and disk shaders need to be set programmatically. To do so, two public properties are added to the PointCloudRenderer. --- Assets/Pcx/PointCloudRenderer.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Assets/Pcx/PointCloudRenderer.cs b/Assets/Pcx/PointCloudRenderer.cs index b03293cd..934d8bda 100644 --- a/Assets/Pcx/PointCloudRenderer.cs +++ b/Assets/Pcx/PointCloudRenderer.cs @@ -42,6 +42,16 @@ public float pointSize { #region Internal resources + public Shader pointShader { + get { return _pointShader; } + set { _pointShader = value; } + } + + public Shader diskShader { + get { return _diskShader; } + set { _diskShader = value; } + } + [SerializeField, HideInInspector] Shader _pointShader; [SerializeField, HideInInspector] Shader _diskShader;