/*--------------------------------------------------------------------------------------------*/ private void TryUpdateColor(HoverMesh pHoverMesh) { Controllers.Set(SettingsControllerMap.MeshColors, this); vCurrColor = GetDisplayColor(pHoverMesh); if (FlashColorMilliseconds > 0) { TimeSpan test = DateTime.UtcNow - GetComponent <HoverIndicator>().LatestSelectionTime; if (test.TotalMilliseconds < FlashColorMilliseconds) { vCurrColor = Color.Lerp(FlashColor, vCurrColor, (float)test.TotalMilliseconds / FlashColorMilliseconds); } } if (!pHoverMesh.DidRebuildMesh && Alpha == vPrevAlpha && vCurrColor == vPrevColor) { return; } Color colorForAllVertices = DisplayUtil.FadeColor(vCurrColor, Alpha); pHoverMesh.Builder.CommitColors(colorForAllVertices); }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateFillMesh(HoverMesh pSegmentMesh, SliderUtil.SegmentInfo pSegmentInfo, float pStartPos, float pEndPos) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent <HoverShapeRect>(); HoverMeshRect meshRect = (HoverMeshRect)pSegmentMesh; pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition + ".x", this); pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition + ".y", this); pSegmentMesh.Controllers.Set(HoverMesh.DisplayModeName, this); meshRect.Controllers.Set(HoverMeshRect.UvTopName, this); meshRect.Controllers.Set(HoverMeshRect.UvBottomName, this); meshShapeRect.SizeY = pSegmentInfo.EndPosition - pSegmentInfo.StartPosition; pSegmentMesh.DisplayMode = (pSegmentInfo.IsFill ? HoverMesh.DisplayModeType.SliderFill : HoverMesh.DisplayModeType.Standard); meshRect.UvTop = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.StartPosition) : 0); meshRect.UvBottom = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.EndPosition) : 1); Vector3 localPos = pSegmentMesh.transform.localPosition; localPos.x = (InsetLeft - InsetRight) / 2; localPos.y = (pSegmentInfo.StartPosition + pSegmentInfo.EndPosition) / 2; pSegmentMesh.transform.localPosition = localPos; }
/*--------------------------------------------------------------------------------------------*/ private void UpdateTrackSegmentColor(HoverMesh pMesh, Color pColor) { HoverAlphaMeshUpdater alphaUp = pMesh.GetComponent <HoverAlphaMeshUpdater>(); alphaUp.StandardColor = pColor; alphaUp.SliderFillColor = pColor; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void TryUpdateColor(HoverMesh pHoverMesh) { Controllers.Set(SettingsControllerMap.MeshColors, this); Color useColor; switch (pHoverMesh.DisplayMode) { case HoverMesh.DisplayModeType.Standard: useColor = StandardColor; break; case HoverMesh.DisplayModeType.SliderFill: useColor = SliderFillColor; break; default: throw new Exception("Unhandled display mode: " + pHoverMesh.DisplayMode); } if (!pHoverMesh.DidRebuildMesh && useColor == vPrevColor) { return; } pHoverMesh.Builder.CommitColors(useColor); }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateFillMesh(HoverMesh pSegmentMesh, SliderUtil.SegmentInfo pSegmentInfo, float pStartPos, float pEndPos) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent<HoverShapeRect>(); HoverMeshRect meshRect = (HoverMeshRect)pSegmentMesh; pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition+".x", this); pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition+".y", this); pSegmentMesh.Controllers.Set(HoverMesh.DisplayModeName, this); meshRect.Controllers.Set(HoverMeshRect.UvTopName, this); meshRect.Controllers.Set(HoverMeshRect.UvBottomName, this); meshShapeRect.SizeY = pSegmentInfo.EndPosition-pSegmentInfo.StartPosition; pSegmentMesh.DisplayMode = (pSegmentInfo.IsFill ? HoverMesh.DisplayModeType.SliderFill : HoverMesh.DisplayModeType.Standard); meshRect.UvTop = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.StartPosition) : 0); meshRect.UvBottom = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.EndPosition) : 1); Vector3 localPos = pSegmentMesh.transform.localPosition; localPos.x = (InsetLeft-InsetRight)/2; localPos.y = (pSegmentInfo.StartPosition+pSegmentInfo.EndPosition)/2; pSegmentMesh.transform.localPosition = localPos; }
/*--------------------------------------------------------------------------------------------*/ protected override void ActivateFillMesh(HoverMesh pSegmentMesh) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent<HoverShapeRect>(); pSegmentMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); RendererUtil.SetActiveWithUpdate(pSegmentMesh, (meshShapeRect.SizeY > 0)); }
/*--------------------------------------------------------------------------------------------*/ protected override void ActivateFillMesh(HoverMesh pSegmentMesh) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent <HoverShapeRect>(); pSegmentMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); RendererUtil.SetActiveWithUpdate(pSegmentMesh, (meshShapeRect.SizeY > 0)); }
/*--------------------------------------------------------------------------------------------*/ private void SetMeshColors(HoverMesh pMesh, Color pStandardColor, Color pFlashColor, Color pFillColor) { HoverAlphaMeshUpdater alphaUp = pMesh.GetComponent <HoverAlphaMeshUpdater>(); alphaUp.StandardColor = pStandardColor; alphaUp.FlashColor = pFlashColor; alphaUp.SliderFillColor = pFillColor; }
/*--------------------------------------------------------------------------------------------*/ protected override void ResetFillMesh(HoverMesh pSegmentMesh) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent<HoverShapeRect>(); meshShapeRect.Controllers.Set(HoverShapeRect.SizeXName, this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeYName, this); meshShapeRect.SizeX = vMeshSizeX; meshShapeRect.SizeY = 0; }
/*--------------------------------------------------------------------------------------------*/ protected virtual void UpdateMeshShape(HoverMesh pMesh, float pSizeX, float pSizeY) { HoverShapeRect meshShape = pMesh.GetComponent<HoverShapeRect>(); meshShape.Controllers.Set(HoverShapeRect.SizeXName, this); meshShape.Controllers.Set(HoverShapeRect.SizeYName, this); meshShape.SizeX = pSizeX; meshShape.SizeY = pSizeY; }
/*--------------------------------------------------------------------------------------------*/ protected override void ResetFillMesh(HoverMesh pSegmentMesh) { HoverShapeRect meshShapeRect = pSegmentMesh.GetComponent <HoverShapeRect>(); meshShapeRect.Controllers.Set(HoverShapeRect.SizeXName, this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeYName, this); meshShapeRect.SizeX = vMeshSizeX; meshShapeRect.SizeY = 0; }
/*--------------------------------------------------------------------------------------------*/ protected virtual void UpdateMeshShape(HoverMesh pMesh, float pOuterRad, float pInnerRad) { HoverShapeArc meshShape = pMesh.GetComponent<HoverShapeArc>(); meshShape.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShape.Controllers.Set(HoverShapeArc.InnerRadiusName, this); meshShape.OuterRadius = pOuterRad; meshShape.InnerRadius = pInnerRad; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void UpdateTickList() { if (SegmentInfo == null || SegmentInfo.TickInfoList == null) { return; } int newTickCount = SegmentInfo.TickInfoList.Count; if (Ticks.Count == newTickCount) { return; } #if UNITY_EDITOR //ticks are often added within a prefab; this forces serialization of the "Ticks" list UnityEditor.EditorUtility.SetDirty(this); #endif if (TickPrefab == null) { Debug.LogWarning("Cannot build ticks without a prefab reference.", this); return; } while (Ticks.Count < newTickCount) { HoverMesh tickMesh = RendererUtil.TryBuildPrefabRenderer <HoverMesh>(TickPrefab); tickMesh.name = "Tick" + Ticks.Count; tickMesh.transform.SetParent(gameObject.transform, false); Ticks.Add(tickMesh); } while (Ticks.Count > newTickCount) { int lastTickIndex = Ticks.Count - 1; HoverMesh tick = Ticks[lastTickIndex]; Ticks.RemoveAt(lastTickIndex); if (Application.isPlaying) { Destroy(tick.gameObject); } else { tick.gameObject.SetActive(false); tick.GetComponent <TreeUpdater>().enabled = false; DestroyImmediate(tick.gameObject); } } GetComponent <TreeUpdater>().ImmediateReloadTreeChildren(); }
/*--------------------------------------------------------------------------------------------*/ protected override void ResetFillMesh(HoverMesh pSegmentMesh) { HoverShapeArc meshShapeArc = pSegmentMesh.GetComponent <HoverShapeArc>(); meshShapeArc.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.InnerRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.ArcDegreesName, this); meshShapeArc.OuterRadius = vMeshOuterRadius; meshShapeArc.InnerRadius = vMeshInnerRadius; meshShapeArc.ArcDegrees = 0; }
/*--------------------------------------------------------------------------------------------*/ protected override void ResetFillMesh(HoverMesh pSegmentMesh) { HoverShapeArc meshShapeArc = pSegmentMesh.GetComponent<HoverShapeArc>(); meshShapeArc.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.InnerRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.ArcDegreesName, this); meshShapeArc.OuterRadius = vMeshOuterRadius; meshShapeArc.InnerRadius = vMeshInnerRadius; meshShapeArc.ArcDegrees = 0; }
/*--------------------------------------------------------------------------------------------*/ protected virtual void UpdateMeshShape(HoverMesh pMesh, float pOuterRad, float pInnerRad, bool pShowMesh = true) { HoverShapeArc meshShape = pMesh.GetComponent <HoverShapeArc>(); pMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); meshShape.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShape.Controllers.Set(HoverShapeArc.InnerRadiusName, this); RendererUtil.SetActiveWithUpdate(pMesh, (pShowMesh && pMesh.IsMeshVisible)); meshShape.OuterRadius = pOuterRad; meshShape.InnerRadius = pInnerRad; }
/*--------------------------------------------------------------------------------------------*/ protected virtual void UpdateMeshShape(HoverMesh pMesh, float pSizeX, float pSizeY, bool pShowMesh = true) { HoverShapeRect meshShape = pMesh.GetComponent <HoverShapeRect>(); pMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); meshShape.Controllers.Set(HoverShapeRect.SizeXName, this); meshShape.Controllers.Set(HoverShapeRect.SizeYName, this); RendererUtil.SetActiveWithUpdate(pMesh, (pShowMesh && pMesh.IsMeshVisible)); meshShape.SizeX = pSizeX; meshShape.SizeY = pSizeY; }
/*--------------------------------------------------------------------------------------------*/ private Color GetDisplayColor(HoverMesh pHoverMesh) { switch (pHoverMesh.DisplayMode) { case HoverMesh.DisplayModeType.Standard: return(StandardColor); case HoverMesh.DisplayModeType.SliderFill: return(SliderFillColor); default: throw new Exception("Unhandled display mode: " + pHoverMesh.DisplayMode); } }
/*--------------------------------------------------------------------------------------------*/ public void TreeUpdate() { HoverMesh hoverMesh = GetComponent <HoverMesh>(); TryUpdateLayer(hoverMesh); TryUpdateColor(hoverMesh); vPrevLayer = SortingLayer; vPrevOrder = SortingOrder; vPrevAlpha = Alpha; vPrevColor = vCurrColor; Controllers.TryExpireControllers(); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void UpdateChildMesh(HoverMesh pChildMesh) { HoverAlphaMeshUpdater meshUp = pChildMesh.GetComponent <HoverAlphaMeshUpdater>(); if (meshUp == null) { return; } meshUp.Controllers.Set(HoverAlphaMeshUpdater.SortingLayerName, this); meshUp.Controllers.Set(HoverAlphaMeshUpdater.AlphaName, this); meshUp.SortingLayer = SortingLayer; meshUp.Alpha = Alpha; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void TryUpdateLayer(HoverMesh pHoverMesh) { Controllers.Set(SettingsControllerMap.MeshRendererSortingLayer, this); Controllers.Set(SettingsControllerMap.MeshRendererSortingOrder, this); if (!pHoverMesh.DidRebuildMesh && SortingLayer == vPrevLayer && SortingOrder == vPrevOrder) { return; } MeshRenderer meshRend = gameObject.GetComponent <MeshRenderer>(); meshRend.sortingLayerName = SortingLayer; meshRend.sortingOrder = SortingOrder; }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateTickMesh(HoverMesh pTickMesh, SliderUtil.SegmentInfo pTickInfo) { HoverShapeArc meshShapeArc = pTickMesh.GetComponent <HoverShapeArc>(); pTickMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalRotation, this); meshShapeArc.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.InnerRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.ArcDegreesName, this); meshShapeArc.OuterRadius = vTickOuterRadius; meshShapeArc.InnerRadius = vTickInnerRadius; meshShapeArc.ArcDegrees = pTickInfo.EndPosition - pTickInfo.StartPosition; pTickMesh.transform.localRotation = Quaternion.AngleAxis( (pTickInfo.StartPosition + pTickInfo.EndPosition) / 2, Vector3.forward); RendererUtil.SetActiveWithUpdate(pTickMesh, !pTickInfo.IsHidden); }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateTickMesh(HoverMesh pTickMesh, SliderUtil.SegmentInfo pTickInfo) { HoverShapeRect meshShapeRect = pTickMesh.GetComponent <HoverShapeRect>(); pTickMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition + ".x", this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition + ".y", this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeXName, this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeYName, this); meshShapeRect.SizeX = vTickSizeX; meshShapeRect.SizeY = pTickInfo.EndPosition - pTickInfo.StartPosition; Vector3 localPos = pTickMesh.transform.localPosition; localPos.x = (InsetLeft - InsetRight) / 2; localPos.y = (pTickInfo.StartPosition + pTickInfo.EndPosition) / 2; pTickMesh.transform.localPosition = localPos; RendererUtil.SetActiveWithUpdate(pTickMesh, !pTickInfo.IsHidden); }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateFillMesh(HoverMesh pSegmentMesh, SliderUtil.SegmentInfo pSegmentInfo, float pStartPos, float pEndPos) { HoverShapeArc meshShapeArc = pSegmentMesh.GetComponent<HoverShapeArc>(); HoverMeshArc meshArc = (HoverMeshArc)pSegmentMesh; pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalRotation, this); pSegmentMesh.Controllers.Set(HoverMesh.DisplayModeName, this); meshArc.Controllers.Set(HoverMeshArc.UvMinArcDegreeName, this); meshArc.Controllers.Set(HoverMeshArc.UvMaxArcDegreeName, this); meshShapeArc.ArcDegrees = pSegmentInfo.EndPosition-pSegmentInfo.StartPosition; pSegmentMesh.DisplayMode = (pSegmentInfo.IsFill ? HoverMesh.DisplayModeType.SliderFill : HoverMesh.DisplayModeType.Standard); meshArc.UvMinArcDegree = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.StartPosition) : 0); meshArc.UvMaxArcDegree = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.EndPosition) : 1); pSegmentMesh.transform.localRotation = Quaternion.AngleAxis( (pSegmentInfo.StartPosition+pSegmentInfo.EndPosition)/2, Vector3.forward); }
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateFillMesh(HoverMesh pSegmentMesh, SliderUtil.SegmentInfo pSegmentInfo, float pStartPos, float pEndPos) { HoverShapeArc meshShapeArc = pSegmentMesh.GetComponent <HoverShapeArc>(); HoverMeshArc meshArc = (HoverMeshArc)pSegmentMesh; pSegmentMesh.Controllers.Set(SettingsControllerMap.TransformLocalRotation, this); pSegmentMesh.Controllers.Set(HoverMesh.DisplayModeName, this); meshArc.Controllers.Set(HoverMeshArc.UvMinArcDegreeName, this); meshArc.Controllers.Set(HoverMeshArc.UvMaxArcDegreeName, this); meshShapeArc.ArcDegrees = pSegmentInfo.EndPosition - pSegmentInfo.StartPosition; pSegmentMesh.DisplayMode = (pSegmentInfo.IsFill ? HoverMesh.DisplayModeType.SliderFill : HoverMesh.DisplayModeType.Standard); meshArc.UvMinArcDegree = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.StartPosition) : 0); meshArc.UvMaxArcDegree = (UseTrackUv ? Mathf.InverseLerp(pStartPos, pEndPos, pSegmentInfo.EndPosition) : 1); pSegmentMesh.transform.localRotation = Quaternion.AngleAxis( (pSegmentInfo.StartPosition + pSegmentInfo.EndPosition) / 2, Vector3.forward); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ protected virtual void UpdateFillMeshes() { HoverFillSlider fillSlider = gameObject.GetComponent <HoverFillSlider>(); if (fillSlider.SegmentInfo == null) { return; } List <SliderUtil.SegmentInfo> segInfoList = fillSlider.SegmentInfo.SegmentInfoList; int segCount = HoverFillSlider.SegmentCount; int segIndex = 0; float startPos = segInfoList[0].StartPosition; float endPos = segInfoList[segInfoList.Count - 1].EndPosition; for (int i = 0; i < segInfoList.Count; i++) { SliderUtil.SegmentInfo segInfo = segInfoList[i]; if (segInfo.Type != SliderUtil.SegmentType.Track) { continue; } UpdateUsedFillMesh(fillSlider.GetChildMesh(segIndex++), segInfo, startPos, endPos); } for (int i = 0; i < segCount; i++) { HoverMesh segMesh = fillSlider.GetChildMesh(i); if (i >= segIndex) { UpdateUnusedFillMesh(segMesh); } ActivateFillMesh(segMesh); } }
/*--------------------------------------------------------------------------------------------*/ protected abstract void ResetFillMesh(HoverMesh pSegmentMesh);
/*--------------------------------------------------------------------------------------------*/ protected abstract void UpdateFillMesh(HoverMesh pSegmentMesh, SliderUtil.SegmentInfo pSegmentInfo, float pStartPos, float pEndPos);
private void Row_EventNodeHover(Rect rect, ThreadRow row, EventNode node) { HoverMesh.AddRect(rect, FrameHover.Color); }
/*--------------------------------------------------------------------------------------------*/ private void UpdateMesh(HoverMesh pMesh) { pMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); RendererUtil.SetActiveWithUpdate(pMesh, pMesh.IsMeshVisible); }
/*--------------------------------------------------------------------------------------------*/ protected abstract void ActivateFillMesh(HoverMesh pSegmentMesh);
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateTickMesh(HoverMesh pTickMesh, SliderUtil.SegmentInfo pTickInfo) { HoverShapeRect meshShapeRect = pTickMesh.GetComponent<HoverShapeRect>(); pTickMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition+".x", this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalPosition+".y", this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeXName, this); meshShapeRect.Controllers.Set(HoverShapeRect.SizeYName, this); meshShapeRect.SizeX = vTickSizeX; meshShapeRect.SizeY = pTickInfo.EndPosition-pTickInfo.StartPosition; Vector3 localPos = pTickMesh.transform.localPosition; localPos.x = (InsetLeft-InsetRight)/2; localPos.y = (pTickInfo.StartPosition+pTickInfo.EndPosition)/2; pTickMesh.transform.localPosition = localPos; RendererUtil.SetActiveWithUpdate(pTickMesh, !pTickInfo.IsHidden); }
/*--------------------------------------------------------------------------------------------*/ private void UpdateMesh(HoverMesh pMesh, bool pShowMesh = true) { pMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); RendererUtil.SetActiveWithUpdate(pMesh, (pShowMesh && pMesh.IsMeshVisible)); }
/*--------------------------------------------------------------------------------------------*/ protected abstract void UpdateTickMesh(HoverMesh pTickMesh, SliderUtil.SegmentInfo pTickInfo);
/*--------------------------------------------------------------------------------------------*/ private void UpdateMesh(HoverMesh pMesh, bool pShowMesh=true) { pMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); RendererUtil.SetActiveWithUpdate(pMesh, (pShowMesh && pMesh.IsMeshVisible)); }
/*--------------------------------------------------------------------------------------------*/ private void SetMeshColors(HoverMesh pMesh, Color pStandardColor, Color pFlashColor) { SetMeshColors(pMesh, pStandardColor, pFlashColor, pStandardColor); }
/*--------------------------------------------------------------------------------------------*/ protected abstract void UpdateUnusedFillMesh(HoverMesh pSegmentMesh);
/*--------------------------------------------------------------------------------------------*/ protected override void UpdateTickMesh(HoverMesh pTickMesh, SliderUtil.SegmentInfo pTickInfo) { HoverShapeArc meshShapeArc = pTickMesh.GetComponent<HoverShapeArc>(); pTickMesh.Controllers.Set(SettingsControllerMap.GameObjectActiveSelf, this); pTickMesh.Controllers.Set(SettingsControllerMap.TransformLocalRotation, this); meshShapeArc.Controllers.Set(HoverShapeArc.OuterRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.InnerRadiusName, this); meshShapeArc.Controllers.Set(HoverShapeArc.ArcDegreesName, this); meshShapeArc.OuterRadius = vTickOuterRadius; meshShapeArc.InnerRadius = vTickInnerRadius; meshShapeArc.ArcDegrees = pTickInfo.EndPosition-pTickInfo.StartPosition; pTickMesh.transform.localRotation = Quaternion.AngleAxis( (pTickInfo.StartPosition+pTickInfo.EndPosition)/2, Vector3.forward); RendererUtil.SetActiveWithUpdate(pTickMesh, !pTickInfo.IsHidden); }