diff --git a/Assets/VRTK/Scripts/Interactions/Highlighters/VRTK_OutlineObjectCopyHighlighter.cs b/Assets/VRTK/Scripts/Interactions/Highlighters/VRTK_OutlineObjectCopyHighlighter.cs index ab73a042b..9d4aea9f3 100644 --- a/Assets/VRTK/Scripts/Interactions/Highlighters/VRTK_OutlineObjectCopyHighlighter.cs +++ b/Assets/VRTK/Scripts/Interactions/Highlighters/VRTK_OutlineObjectCopyHighlighter.cs @@ -100,6 +100,19 @@ public override void Unhighlight(Color? color = null, float duration = 0f) } } + protected virtual void OnEnable() + { + if (customOutlineModels == null) + { + customOutlineModels = new GameObject[0]; + } + + if (customOutlineModelPaths == null) + { + customOutlineModelPaths = new string[0]; + } + } + protected virtual void OnDestroy() { if (highlightModels != null)