private void OnEnable () { mExtents = serializedObject.FindProperty("mExtents" ); mWallUVType = serializedObject.FindProperty("mWallUVType" ); mWallUVTile = serializedObject.FindProperty("mWallUVTile" ); mWallUVOffset = serializedObject.FindProperty("mWallUVOffset" ); mTopBottomUVType = serializedObject.FindProperty("mTopBottomUVType"); mTopBottomUVTile = serializedObject.FindProperty("mTopBottomUVTile"); mTopBottomUVOffset = serializedObject.FindProperty("mTopBottomUVOffset"); mSliceFaces = serializedObject.FindProperty("mSliceFaces" ); mSliceDistance = serializedObject.FindProperty("mSliceDistance" ); mFaceBottom = serializedObject.FindProperty("mFaceBottom" ); mFaceTop = serializedObject.FindProperty("mFaceTop" ); mFaceFront = serializedObject.FindProperty("mFaceFront" ); mFaceBack = serializedObject.FindProperty("mFaceBack" ); mFaceLeft = serializedObject.FindProperty("mFaceLeft" ); mFaceRight = serializedObject.FindProperty("mFaceRight" ); mOverrideBottom = serializedObject.FindProperty("mOverrideBottom"); mOverrideTop = serializedObject.FindProperty("mOverrideTop" ); mOverrideFront = serializedObject.FindProperty("mOverrideFront" ); mOverrideBack = serializedObject.FindProperty("mOverrideBack" ); mOverrideLeft = serializedObject.FindProperty("mOverrideLeft" ); mOverrideRight = serializedObject.FindProperty("mOverrideRight" ); mWasStatic = EditorTools.IsStatic(targets); }
public override void OnInspectorGUI() { EditorTools.MultiType isStatic = EditorTools.IsStatic(targets); // Check if the scale has been modified for (int i = 0; i < targets.Length; ++i) { CheckScale(targets[i] as SuperPlane); } DrawInspectorFields(); ForceNewMeshButton(); // Check for changes and undo/redo, and update the mesh if so if (mWasStatic != isStatic || serializedObject.ApplyModifiedProperties() || GUI.changed || (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed")) { for (int i = 0; i < targets.Length; ++i) { ((SuperPlane)targets[i]).Build(true); } } // must go last, since it can delete this object ReplaceWithPlaneButton(); // for tracking changes in static-ness mWasStatic = isStatic; }
private void OnEnable() { mExtents = serializedObject.FindProperty("mExtents"); mWallUVType = serializedObject.FindProperty("mWallUVType"); mWallUVTile = serializedObject.FindProperty("mWallUVTile"); mWallUVOffset = serializedObject.FindProperty("mWallUVOffset"); mTopBottomUVType = serializedObject.FindProperty("mTopBottomUVType"); mTopBottomUVTile = serializedObject.FindProperty("mTopBottomUVTile"); mTopBottomUVOffset = serializedObject.FindProperty("mTopBottomUVOffset"); mSliceFaces = serializedObject.FindProperty("mSliceFaces"); mSliceDistance = serializedObject.FindProperty("mSliceDistance"); mFaceBottom = serializedObject.FindProperty("mFaceBottom"); mFaceTop = serializedObject.FindProperty("mFaceTop"); mFaceFront = serializedObject.FindProperty("mFaceFront"); mFaceBack = serializedObject.FindProperty("mFaceBack"); mFaceLeft = serializedObject.FindProperty("mFaceLeft"); mFaceRight = serializedObject.FindProperty("mFaceRight"); mOverrideBottom = serializedObject.FindProperty("mOverrideBottom"); mOverrideTop = serializedObject.FindProperty("mOverrideTop"); mOverrideFront = serializedObject.FindProperty("mOverrideFront"); mOverrideBack = serializedObject.FindProperty("mOverrideBack"); mOverrideLeft = serializedObject.FindProperty("mOverrideLeft"); mOverrideRight = serializedObject.FindProperty("mOverrideRight"); mWasStatic = EditorTools.IsStatic(targets); }
private void OnEnable () { mExtents = serializedObject.FindProperty("mExtents"); mUVType = serializedObject.FindProperty("mUVType"); mUVOffset = serializedObject.FindProperty("mUVOffset"); mUVTile = serializedObject.FindProperty("mUVTile"); mSliceFaces = serializedObject.FindProperty("mSliceFaces"); mSliceDistance = serializedObject.FindProperty("mSliceDistance"); mWasStatic = EditorTools.IsStatic(targets); }
private void OnEnable() { mExtents = serializedObject.FindProperty("mExtents"); mUVType = serializedObject.FindProperty("mUVType"); mUVOffset = serializedObject.FindProperty("mUVOffset"); mUVTile = serializedObject.FindProperty("mUVTile"); mSliceFaces = serializedObject.FindProperty("mSliceFaces"); mSliceDistance = serializedObject.FindProperty("mSliceDistance"); mWasStatic = EditorTools.IsStatic(targets); }
public override void OnInspectorGUI () { EditorTools.MultiType isStatic = EditorTools.IsStatic(targets); // Check if the scale has been modified for (int i = 0; i < targets.Length; ++i) { CheckScale(targets[i] as SuperPlane); } DrawInspectorFields(); ForceNewMeshButton (); // Check for changes and undo/redo, and update the mesh if so if (mWasStatic != isStatic || serializedObject.ApplyModifiedProperties() || GUI.changed || (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed")) { for (int i = 0; i < targets.Length; ++i) { ((SuperPlane)targets[i]).Build(true); } } // must go last, since it can delete this object ReplaceWithPlaneButton(); // for tracking changes in static-ness mWasStatic = isStatic; }