internal override void OnBrushEnter(EditableObject target, BrushSettings settings) { base.OnBrushEnter(target, settings); if (!likelyToSupportVertexSculpt) { return; } vertices = target.editMesh.vertices; normalLookup = PolyMeshUtility.GetSmoothNormalLookup(target.editMesh); commonVertices = PolyMeshUtility.GetCommonVertices(target.editMesh); commonVertexCount = commonVertices.Length; }
internal override void OnBrushEnter(EditableObject target, BrushSettings settings) { base.OnBrushEnter(target, settings); if (!m_LikelyToSupportVertexSculpt) { return; } EditableObjectData data; if (!m_EditableObjectsData.TryGetValue(target, out data)) { data = new EditableObjectData(); m_EditableObjectsData.Add(target, data); } data.Vertices = target.editMesh.vertices; data.NormalLookup = PolyMeshUtility.GetSmoothNormalLookup(target.editMesh); data.CommonVertices = PolyMeshUtility.GetCommonVertices(target.editMesh); data.CommonVertexCount = data.CommonVertices.Length; }