コード例 #1
0
        internal override void OnBrushEnter(EditableObject target, BrushSettings settings)
        {
            base.OnBrushEnter(target, settings);

            if (!likelyToSupportVertexSculpt)
            {
                return;
            }

            vertices          = target.editMesh.vertices;
            neighborLookup    = PolyMeshUtility.GetAdjacentVertices(target.editMesh);
            commonVertices    = PolyMeshUtility.GetCommonVertices(target.editMesh);
            commonVertexCount = commonVertices.Count;
        }
コード例 #2
0
        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.neighborLookup    = PolyMeshUtility.GetAdjacentVertices(target.editMesh);
            data.commonVertices    = PolyMeshUtility.GetCommonVertices(target.editMesh);
            data.commonVertexCount = data.commonVertices.Length;
        }