Ejemplo n.º 1
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();

                    }

                }

            }

        }
Ejemplo n.º 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();
                    }
                }
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 4
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();

            }

        }