// If the target mesh has more vertices that the allowed count, the component will not be used publicint VertexLimit { get; } // A new mesh reference will be created once the MD Package's component is applied to a gameObject publicbool CreateNewMeshReferenceAsDefault { get; } // Allow editor windows to popup if any notification has outputed publicbool PopupEditorWindowIfAnyNotification { get; } // Auto-recalculate mesh normals if required. Otherwise you will have to manually recalculate mesh normals publicbool AutoRecalculateNormalsAsDefault { get; } // Use advanced-mesh normals recalculation as default with custom smoothing angle, as default publicbool SmoothAngleNormalsRecalculationAsDefault { get; } // Auto-recalculate mesh bounds as default, if required. Otherwise you will have to manually recalculate mesh bounds publicbool AutoRecalculateBoundsAsDefault { get; }
You can access the global preferences via editor in Window/MD_Package/Preferences or at runtime by getting the reference to the scriptable object. See the example code below.
using UnityEngine; using MDPackage;
/// <summary> /// Simple script for getting the MD package Preferences /// </summary> publicclassSampleScript : MonoBehaviour { privatevoid Start() { // Get the preferences scriptable object var preferences = MD_Preferences.SelectPreferencesAsset(); if(preferences != null) // Check for null Debug.Log(preferences.VertexLimit.ToString()); // What's the current vertex limit? } }