void OnEnable() { mTarget = this.target as Image3DRenderer; mImageLayoutProp = this.serializedObject.FindProperty("ImageLayout"); mSpriteProp = this.serializedObject.FindProperty("Sprite"); mMaterialProp = this.serializedObject.FindProperty("Mat"); mWidthProp = this.mImageLayoutProp.FindPropertyRelative("Width"); mHeightProp = this.mImageLayoutProp.FindPropertyRelative("Height"); mVertexColorProp = this.mImageLayoutProp.FindPropertyRelative("Color"); mTypeProp = this.mImageLayoutProp.FindPropertyRelative("ImageType"); mIsPreserveAspectProp = this.mImageLayoutProp.FindPropertyRelative("IsPreserveAspect"); mIsFillCenterProp = this.mImageLayoutProp.FindPropertyRelative("IsFillCenter"); mFillMethodProp = this.mImageLayoutProp.FindPropertyRelative("ImageFillMethod"); mFillHorizontalOriginProp = this.mImageLayoutProp.FindPropertyRelative("ImageOriginHorizontal"); mFillVerticalOriginProp = this.mImageLayoutProp.FindPropertyRelative("ImageOriginVertical"); mFillRadial90Prop = this.mImageLayoutProp.FindPropertyRelative("ImageOrigin90"); mFillRadial180Prop = this.mImageLayoutProp.FindPropertyRelative("ImageOrigin180"); mFillRadial360Prop = this.mImageLayoutProp.FindPropertyRelative("ImageOrigin360"); mFillAmountProp = this.mImageLayoutProp.FindPropertyRelative("FillAmount"); mFillIsClockwiseProp = this.mImageLayoutProp.FindPropertyRelative("IsClockwise"); }
void OnDestroy() { mTarget = null; }