#if UNITY_EDITOR
using UnityEngine;
using System.Collections.Generic;
namespace UnityEngine.Polybrush
{
///
/// Overrides the default scene zoom with the current values.
///
internal class ZoomOverride : MonoBehaviour
{
// The current weights applied to this mesh
protected float[] weights;
// Normalized brush strength
protected float normalizedStrength;
internal virtual void SetWeights(float[] weights, float normalizedStrength)
{
this.weights = weights;
this.normalizedStrength = normalizedStrength;
}
internal virtual float[] GetWeights()
{
return weights;
}
internal Mesh Mesh
{
get
{
return gameObject.GetMesh();
}
}
///
/// Let the temp mesh know that vertex positions have changed.
///
///
internal virtual void OnVerticesMoved(PolyMesh mesh) {}
protected virtual void OnEnable()
{
this.hideFlags = HideFlags.HideAndDontSave;
Component[] other = GetComponents();
foreach(Component c in other)
if(c != this)
GameObject.DestroyImmediate(c);
}
}
}
#endif