public DottedLineGameObject(Shader RangeRederingShader, DottedLineInherentData DottedLineInherentData) { this.AssociatedGameObject = new GameObject("DottedLine"); this.AssociatedGameObject.transform.parent = DottedLineManager.Get().DottedLineContainer.transform; this.AssociatedGameObject.transform.position = Vector3.zero; this.AssociatedGameObject.transform.localScale = Vector3.one; this.AssociatedGameObject.transform.rotation = Quaternion.identity; this.MeshFilter = this.AssociatedGameObject.AddComponent <MeshFilter>(); this.MeshFilter.mesh = new Mesh(); this.MeshRenderer = this.AssociatedGameObject.AddComponent <MeshRenderer>(); this.MeshRenderer.shadowCastingMode = ShadowCastingMode.Off; this.MeshRenderer.lightProbeUsage = LightProbeUsage.Off; this.MeshRenderer.material = new Material(RangeRederingShader); this.MeshRenderer.material.SetColor("_BaseColor", DottedLineInherentData.BaseColor); this.MeshRenderer.material.SetColor("_MovingColor", DottedLineInherentData.MovingColor); this.MeshRenderer.material.SetFloat("_MovingWidth", DottedLineInherentData.MovingWidth); }
public DottedLine(DottedLineID dottedLineID) { this.dottedLineInherentData = VisualFeedbackConfigurationGameObject.Get().DottedLineConfiguration.ConfigurationInherentData[dottedLineID]; this.dottedLineGameObject = new DottedLineGameObject(VisualFeedbackConfigurationGameObject.Get().DottedLineStaticConfiguration.BaseDottedLineShader, this.dottedLineInherentData); }