////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		protected override IProjectionVisualSettings GetSettingsInner() {
			var sett = new ProjectionVisualSettingsStandard();
			sett.Renderer = typeof(UiProjectionRenderer);
			sett.SpotlightColor = SpotlightColor;
			sett.LineColor = LineColor;
			return sett;
		}
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual void Build(ProjectionState pProjectionState,
																IProjectionVisualSettings pSettings)
        {
            vProjectionState = pProjectionState;
            vSettings = (ProjectionVisualSettingsStandard)pSettings;

            ////

            vSpotObj = new GameObject("Spot");
            vSpotObj.transform.SetParent(gameObject.transform, false);
            vSpotObj.transform.localScale = Vector3.zero;

            MeshFilter spotFilt = vSpotObj.AddComponent<MeshFilter>();
            MeshUtil.BuildCircleMesh(spotFilt.mesh, 0.5f, 32);
            vSpotMesh = spotFilt.mesh;

            MeshRenderer spotRend = vSpotObj.AddComponent<MeshRenderer>();
            spotRend.sharedMaterial =
                Materials.GetLayer(Materials.Layer.AboveText, Materials.DepthHintMax);

            ////

            vLineObj = GameObject.CreatePrimitive(PrimitiveType.Cube);
            vLineObj.name = "Line";
            vLineObj.transform.SetParent(gameObject.transform, false);
            vLineObj.transform.localScale = Vector3.zero;
            vLineMesh = vLineObj.GetComponent<MeshFilter>().mesh;

            MeshRenderer lineRend = vLineObj.GetComponent<MeshRenderer>();
            lineRend.sharedMaterial =
                Materials.GetLayer(Materials.Layer.AboveText, Materials.DepthHintMax);
        }
Exemplo n.º 3
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        protected override IProjectionVisualSettings GetSettingsInner()
        {
            var sett = new ProjectionVisualSettingsStandard();

            sett.Renderer       = typeof(UiProjectionRenderer);
            sett.SpotlightColor = SpotlightColor;
            sett.LineColor      = LineColor;
            return(sett);
        }