diff --git a/UnityProject/Assets/Scenes/Examples/Composition/script/BallMapping.cs b/UnityProject/Assets/Scenes/Examples/Composition/script/BallMapping.cs index d3fb3f9..6fe732c 100644 --- a/UnityProject/Assets/Scenes/Examples/Composition/script/BallMapping.cs +++ b/UnityProject/Assets/Scenes/Examples/Composition/script/BallMapping.cs @@ -1,12 +1,12 @@ using UnityEngine; -namespace Scenes.Examples.Example1.script +namespace cylvester { public class BallMapping : MonoBehaviour { - [SerializeField] private GameObject ball; + [SerializeField] private GameObject ball = null; [SerializeField] private float mapToSize = 10f; - [SerializeField] private RmsAnalyzer analyzer; + [SerializeField] private RmsAnalyzer analyzer = null; void Update() { diff --git a/UnityProject/Assets/Scenes/Examples/Composition/script/RmsAnalyzer.cs b/UnityProject/Assets/Scenes/Examples/Composition/script/RmsAnalyzer.cs index 86134fb..2f4e1d7 100644 --- a/UnityProject/Assets/Scenes/Examples/Composition/script/RmsAnalyzer.cs +++ b/UnityProject/Assets/Scenes/Examples/Composition/script/RmsAnalyzer.cs @@ -1,7 +1,7 @@ using System.Linq; using UnityEngine; -namespace Scenes.Examples.Example1.script +namespace cylvester { public class RmsAnalyzer : MonoBehaviour { diff --git a/UnityProject/Assets/Scenes/Examples/PostProcessing/script/BokehBind.cs b/UnityProject/Assets/Scenes/Examples/PostProcessing/script/BokehBind.cs index a4f0af6..db40342 100644 --- a/UnityProject/Assets/Scenes/Examples/PostProcessing/script/BokehBind.cs +++ b/UnityProject/Assets/Scenes/Examples/PostProcessing/script/BokehBind.cs @@ -5,7 +5,7 @@ using UnityEngine.Rendering; public class BokehBind : MonoBehaviour { private Bloom bloom_; - [SerializeField] Volume volume; + [SerializeField] Volume volume = null; private void Start() { diff --git a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/FlareBind.cs b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/FlareBind.cs index 59f5cb2..d8c684e 100644 --- a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/FlareBind.cs +++ b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/FlareBind.cs @@ -3,7 +3,7 @@ using UnityEngine.Experimental.VFX; public class FlareBind : MonoBehaviour { - [SerializeField] private VisualEffect flareEffect; + [SerializeField] private VisualEffect flareEffect = null; private static readonly string Spread = "spread"; public void OnEnergyChanged(float energy) diff --git a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs index f8e0adf..6ae9ff4 100644 --- a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs +++ b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs @@ -3,7 +3,7 @@ using UnityEngine.Experimental.VFX; public class SmokeBind : MonoBehaviour { - [SerializeField] private VisualEffect smokeEffect; + [SerializeField] private VisualEffect smokeEffect = null; private static readonly string SmokeAnimSpeed = "smokeAnimSpeed"; public void OnEnergyChanged(float energy) diff --git a/UnityProject/Assets/Scripts/PdConnection/PdSpectrumBind.cs b/UnityProject/Assets/Scripts/PdConnection/PdSpectrumBind.cs index dad261d..c4b7f8f 100644 --- a/UnityProject/Assets/Scripts/PdConnection/PdSpectrumBind.cs +++ b/UnityProject/Assets/Scripts/PdConnection/PdSpectrumBind.cs @@ -9,9 +9,9 @@ namespace cylvester public class PdSpectrumBind : MonoBehaviour { - [SerializeField] private PdBackend pdBackend; - [SerializeField] private Rect selection; - [SerializeField] private UnityFloatEvent energyChanged; + [SerializeField] private PdBackend pdBackend = null; + [SerializeField] private Rect selection = Rect.zero; + [SerializeField] private UnityFloatEvent energyChanged = null; [SerializeField] private int channel = 0; private ISpectrumGenerator spectrumGenerator_; diff --git a/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs b/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs index 8ec05b1..37c5c25 100644 --- a/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs +++ b/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs @@ -5,23 +5,20 @@ namespace Visualizer { class IRPanelBehaviour : MonoBehaviour { - #pragma warning disable 649 - [SerializeField] private KinectManagerBehaviour kinectManagerBehaviour; - [SerializeField] private GameObject panel; - #pragma warning restore 649 + [SerializeField] private KinectManagerBehaviour kinectManagerBehaviour = null; + [SerializeField] private GameObject panel = null; private Renderer renderer_; - private Texture2D texture2D_; + private static readonly int BaseColorMap = Shader.PropertyToID("_BaseColorMap"); void Start() { renderer_ = panel.GetComponent(); - texture2D_ = new Texture2D(512, 512); } void Update() { - renderer_.material.SetTexture("_BaseColorMap", kinectManagerBehaviour.KinectSensor.InfraredCamera.Data); + renderer_.material.SetTexture(BaseColorMap, kinectManagerBehaviour.KinectSensor.InfraredCamera.Data); } } } \ No newline at end of file diff --git a/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs index a3fa987..a646f8f 100644 --- a/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs +++ b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs @@ -6,8 +6,8 @@ namespace cylvester { private const int historySize = 32; - [SerializeField] private PdBackend pdBackend; - [SerializeField] private GameObject spectrumPrefab; + [SerializeField] private PdBackend pdBackend = null; + [SerializeField] private GameObject spectrumPrefab = null; [SerializeField, Range(1, 16)] private int channel = 1; private IPdArray spectrumArray_;