Example #1
0
        /// <summary>
        /// Create a new volume highlighter and return a reference to the LBVolumeHighlight
        /// script attached to the gameobject.
        /// </summary>
        /// <param name="isDrawFullMesh"></param>
        /// <param name="meshColour"></param>
        /// <returns></returns>
        public static LBVolumeHighlight CreateVolumeHighLighter(bool isDrawFullMesh, Color meshColour)
        {
            LBVolumeHighlight highLighter = null;

            GameObject th = new GameObject("Volume Highlight");

            highLighter = th.AddComponent <LBVolumeHighlight>();

            if (highLighter != null)
            {
                highLighter.gizmoColour    = meshColour;
                highLighter.isDrawFullMesh = isDrawFullMesh;
            }

            return(highLighter);
        }
Example #2
0
        /// <summary>
        /// Create a new volume highlighter and return a reference to the LBVolumeHighlight
        /// script attached to the gameobject
        /// </summary>
        /// <returns></returns>
        public static LBVolumeHighlight CreateVolumeHighLighter()
        {
            LBVolumeHighlight highLighter = null;

            GameObject th = new GameObject("Volume Highlight");

            highLighter = th.AddComponent <LBVolumeHighlight>();

            if (highLighter != null)
            {
                highLighter.gizmoColour    = LBLandscape.GetDefaultMeshVolumeHighlighterColour();
                highLighter.isDrawFullMesh = false;
            }

            return(highLighter);
        }