public override void DrawContent () {
            base.DrawContent();

            VoxelMap map = voxelMap;
            voxelMap = (VoxelMap)EditorGUILayout.ObjectField(voxelMap, typeof(VoxelMap), true);
            if (voxelMap != map) {

                OnVoxelMapChanged();

            }

            if (voxelMap != null) {

                VoxelSwatch swatch = voxelSwatch;
                voxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(voxelSwatch, typeof(VoxelSwatch), true);

                if (voxelSwatch != swatch) {

                    OnVoxelSwatchChanged();

                }

                if (voxelSwatch != null) {

                    if (GUILayout.Button("Reload Swatch.")) {

                        voxelSwatch.LoadSwatches();

                    }

                }

            }

        }
Beispiel #2
0
        public override void DrawContent()
        {
            base.DrawContent();

            VoxelMap map = voxelMap;

            voxelMap = (VoxelMap)EditorGUILayout.ObjectField(voxelMap, typeof(VoxelMap), true);
            if (voxelMap != map)
            {
                OnVoxelMapChanged();
            }

            if (voxelMap != null)
            {
                VoxelSwatch swatch = voxelSwatch;
                voxelSwatch = (VoxelSwatch)EditorGUILayout.ObjectField(voxelSwatch, typeof(VoxelSwatch), true);

                if (voxelSwatch != swatch)
                {
                    OnVoxelSwatchChanged();
                }

                if (voxelSwatch != null)
                {
                    if (GUILayout.Button("Reload Swatch."))
                    {
                        voxelSwatch.LoadSwatches();
                    }
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// When the voxel swatch is changed
        /// </summary>
        /// <param name="_swatch">the new swatch</param>
        public void OnVoxelSwatchChanged(VoxelSwatch _swatch)
        {
            swatchReference = _swatch;

            if (swatchReference != null)
            {
                SetCategory(0);
                swatchReference.LoadSwatches();
            }
        }
        /// <summary>
        /// When the voxel swatch is changed
        /// </summary>
        /// <param name="_swatch">the new swatch</param>
        public void OnVoxelSwatchChanged (VoxelSwatch _swatch) {

            swatchReference = _swatch;

            if (swatchReference != null) {

                SetCategory(0);
                swatchReference.LoadSwatches();

            }

        }