Hi,
I’ve been trying to fix the following compiler error,
and I’d be grateful for any advice on fixing it:
BCE0053: Property 'UnityEditor.Editor.preview' is read only.
here’s the code that the error leads to once I double-click on it
class CameraMotionBlurEditor extends Editor
{
var serObj : SerializedObject;
var filterType : SerializedProperty;
var preview_ : SerializedProperty;
var previewScale : SerializedProperty;
var movementScale : SerializedProperty;
var rotationScale : SerializedProperty;
var maxVelocity : SerializedProperty;
var minVelocity : SerializedProperty;
var maxNumSamples : SerializedProperty;
var velocityScale : SerializedProperty;
var velocityDownsample : SerializedProperty;
var noiseTexture : SerializedProperty;
var showVelocity : SerializedProperty;
var showVelocityScale : SerializedProperty;
var excludeLayers : SerializedProperty;
//var dynamicLayers : SerializedProperty;
function OnEnable () {
serObj = new SerializedObject (target);
filterType = serObj.FindProperty ("filterType");
preview = serObj.FindProperty ("preview_");
previewScale = serObj.FindProperty ("previewScale");
movementScale = serObj.FindProperty ("movementScale");
rotationScale = serObj.FindProperty ("rotationScale");
maxVelocity = serObj.FindProperty ("maxVelocity");
minVelocity = serObj.FindProperty ("minVelocity");
maxNumSamples = serObj.FindProperty ("maxNumSamples");
excludeLayers = serObj.FindProperty ("excludeLayers");
//dynamicLayers = serObj.FindProperty ("dynamicLayers");
velocityScale = serObj.FindProperty ("velocityScale");
velocityDownsample = serObj.FindProperty ("velocityDownsample");
noiseTexture = serObj.FindProperty ("noiseTexture");
}
Thank you