protected BaseBrushRenderUIGroupUnderCursor(IBrushUIGroup uiGroup, string name, Texture brushTexture) { object[] arguments = { uiGroup, name, brushTexture }; m_BrushRenderWithTerrain = (TBase)Activator.CreateInstance(typeof(TBase), arguments); m_TerrainAtCreation = terrainUnderCursor; m_ValidBrushTransform = CalculateTransform(ref m_TerrainAtCreation, out m_BrushTransformAtCreation); }
public void OnSceneGUI(Terrain terrain, IBrushUIGroup brushContext) { foreach (var filter in m_filterStack.filters) { if (filter.enabled) { filter.OnSceneGUI(terrain, brushContext); } } }
public BrushRenderWithTerrainUIGroup(IBrushUIGroup uiGroup, string name, Texture brushTexture) { m_UiGroup = uiGroup; m_Name = name; m_BrushTexture = brushTexture; }
public BrushRenderPreviewWithTerrainUiGroup(IBrushUIGroup uiGroup, string name, Texture brushTexture) : base(uiGroup, name, brushTexture) { }
public BrushRenderPreviewUIGroupUnderCursor(IBrushUIGroup uiGroup, string name, Texture brushTexture) : base(uiGroup, name, brushTexture) { }
/// <summary> /// Allows overriding for unit testing purposes /// </summary> /// <param name="uiGroup"></param> internal void ChangeCommonUI(IBrushUIGroup uiGroup) { m_commonUI = uiGroup; }
public virtual void OnSceneGUI(Terrain terrain, IBrushUIGroup brushContext) { }
public override void OnSceneGUI(Terrain terrain, IBrushUIGroup brushContext) { Quaternion windRot = Quaternion.AngleAxis(brushContext.brushRotation, new Vector3(0.0f, 1.0f, 0.0f)); Handles.ArrowHandleCap(0, brushContext.raycastHitUnderCursor.point, windRot, 0.5f * brushContext.brushSize, EventType.Repaint); }