void OnEnable() { if (!Application.isPlaying) { AmplifyColorBase effect = target as AmplifyColorBase; bool needsNewID = string.IsNullOrEmpty(effect.SharedInstanceID); if (!needsNewID) { needsNewID = FindClone(effect); } if (needsNewID) { effect.NewSharedInstanceID(); EditorUtility.SetDirty(target); //Debug.Log( "Assigned new instance ID to " + effect.name + " => " + effect.SharedInstanceID ); } } }
void OnEnable() { tonemapper = serializedObject.FindProperty("Tonemapper"); exposure = serializedObject.FindProperty("Exposure"); linearWhitePoint = serializedObject.FindProperty("LinearWhitePoint"); useDithering = serializedObject.FindProperty("ApplyDithering"); qualityLevel = serializedObject.FindProperty("QualityLevel"); blendAmount = serializedObject.FindProperty("BlendAmount"); lutTexture = serializedObject.FindProperty("LutTexture"); lutBlendTexture = serializedObject.FindProperty("LutBlendTexture"); maskTexture = serializedObject.FindProperty("MaskTexture"); useDepthMask = serializedObject.FindProperty("UseDepthMask"); depthMaskCurve = serializedObject.FindProperty("DepthMaskCurve"); useVolumes = serializedObject.FindProperty("UseVolumes"); exitVolumeBlendTime = serializedObject.FindProperty("ExitVolumeBlendTime"); triggerVolumeProxy = serializedObject.FindProperty("TriggerVolumeProxy"); volumeCollisionMask = serializedObject.FindProperty("VolumeCollisionMask"); if (!Application.isPlaying) { AmplifyColorBase effect = target as AmplifyColorBase; bool needsNewID = string.IsNullOrEmpty(effect.SharedInstanceID); if (!needsNewID) { needsNewID = FindClone(effect); } if (needsNewID) { effect.NewSharedInstanceID(); EditorUtility.SetDirty(target); } } }