public override void LoadPreferences() { if (GetEditorPrefs <string>("Version", "PreDT") == "PreDT") { DeletePreDTSettings(); SavePreferences(); } base.LoadPreferences(); CurvyGlobalManager.DefaultInterpolation = GetEditorPrefs <CurvyInterpolation>("DefaultInterpolation", CurvyGlobalManager.DefaultInterpolation); CurvyGlobalManager.DefaultGizmoColor = GetEditorPrefs <Color>("GizmoColor", CurvyGlobalManager.DefaultGizmoColor); CurvyGlobalManager.DefaultGizmoSelectionColor = GetEditorPrefs <Color>("GizmoSelectionColor", CurvyGlobalManager.DefaultGizmoSelectionColor); CurvyGlobalManager.GizmoControlPointSize = GetEditorPrefs <float>("GizmoControlPointSize", CurvyGlobalManager.GizmoControlPointSize); CurvyGlobalManager.GizmoOrientationLength = GetEditorPrefs <float>("GizmoOrientationLength", CurvyGlobalManager.GizmoOrientationLength); CurvyGlobalManager.GizmoOrientationColor = GetEditorPrefs <Color>("GizmoOrientationColor", CurvyGlobalManager.GizmoOrientationColor); CurvyGlobalManager.Gizmos = GetEditorPrefs <CurvySplineGizmos>("Gizmos", CurvyGlobalManager.Gizmos); SnapValuePrecision = GetEditorPrefs <bool>("SnapValuePrecision", true); CurvyGlobalManager.MaxCachePPU = Mathf.Max(1, GetEditorPrefs <int>("MaxCachePPU", CurvyGlobalManager.MaxCachePPU)); CurvyGlobalManager.SceneViewResolution = Mathf.Clamp01(GetEditorPrefs <float>("SceneViewResolution", CurvyGlobalManager.SceneViewResolution)); CurvyGlobalManager.HideManager = GetEditorPrefs <bool>("HideManager", CurvyGlobalManager.HideManager); UseTiny2DHandles = GetEditorPrefs <bool>("UseTiny2DHandles", UseTiny2DHandles); ShowGlobalToolbar = GetEditorPrefs <bool>("ShowGlobalToolbar", ShowGlobalToolbar); CurvyGlobalManager.SplineLayer = GetEditorPrefs <int>("SplineLayer", CurvyGlobalManager.SplineLayer); CurvyGlobalManager.SaveRuntimeSettings(); mCGAutoModuleDetails = GetEditorPrefs <bool>("CGAutoModuleDetails", mCGAutoModuleDetails); mCGSynchronizeSelection = GetEditorPrefs <bool>("CGSynchronizeSelection", mCGSynchronizeSelection); mCGShowHelp = GetEditorPrefs <bool>("CGShowHelp", mCGShowHelp); mCGGraphSnapping = GetEditorPrefs <int>("CGGraphSnapping", mCGGraphSnapping); mBezierMode = GetEditorPrefs <CurvyBezierModeEnum>("BezierMode", mBezierMode); mAdvBezierMode = GetEditorPrefs <CurvyAdvBezierModeEnum>("AdvBezierMode", mAdvBezierMode); mCustomizationRootPath = GetEditorPrefs <string>("CustomizationRootPath", mCustomizationRootPath); mShowAboutOnLoad = GetEditorPrefs <bool>("ShowAboutOnLoad", mShowAboutOnLoad); DT._UseSnapValuePrecision = SnapValuePrecision; }
public override void LoadPreferences() { if (GetEditorPrefs<string>("Version", "PreDT") == "PreDT") { DeletePreDTSettings(); SavePreferences(); } base.LoadPreferences(); CurvyGlobalManager.DefaultInterpolation = GetEditorPrefs<CurvyInterpolation>("DefaultInterpolation", CurvyGlobalManager.DefaultInterpolation); CurvyGlobalManager.DefaultGizmoColor = GetEditorPrefs<Color>("GizmoColor", CurvyGlobalManager.DefaultGizmoColor); CurvyGlobalManager.DefaultGizmoSelectionColor = GetEditorPrefs<Color>("GizmoSelectionColor", CurvyGlobalManager.DefaultGizmoSelectionColor); CurvyGlobalManager.GizmoControlPointSize=GetEditorPrefs<float>("GizmoControlPointSize", CurvyGlobalManager.GizmoControlPointSize); CurvyGlobalManager.GizmoOrientationLength=GetEditorPrefs<float>("GizmoOrientationLength", CurvyGlobalManager.GizmoOrientationLength); CurvyGlobalManager.GizmoOrientationColor = GetEditorPrefs<Color>("GizmoOrientationColor", CurvyGlobalManager.GizmoOrientationColor); CurvyGlobalManager.Gizmos = GetEditorPrefs<CurvySplineGizmos>("Gizmos", CurvyGlobalManager.Gizmos); SnapValuePrecision = GetEditorPrefs<bool>("SnapValuePrecision", true); CurvyGlobalManager.MaxCachePPU = Mathf.Max(1, GetEditorPrefs<int>("MaxCachePPU", CurvyGlobalManager.MaxCachePPU)); CurvyGlobalManager.SceneViewResolution = Mathf.Clamp01(GetEditorPrefs<float>("SceneViewResolution", CurvyGlobalManager.SceneViewResolution)); UseTiny2DHandles = GetEditorPrefs<bool>("UseTiny2DHandles", UseTiny2DHandles); ShowGlobalToolbar = GetEditorPrefs<bool>("ShowGlobalToolbar", ShowGlobalToolbar); CurvyGlobalManager.SplineLayer = GetEditorPrefs<int>("SplineLayer", CurvyGlobalManager.SplineLayer); CurvyGlobalManager.SaveRuntimeSettings(); mCGAutoModuleDetails = GetEditorPrefs<bool>("CGAutoModuleDetails", mCGAutoModuleDetails); mCGSynchronizeSelection = GetEditorPrefs<bool>("CGSynchronizeSelection", mCGSynchronizeSelection); mCGShowHelp = GetEditorPrefs<bool>("CGShowHelp", mCGShowHelp); mCGGraphSnapping = GetEditorPrefs<int>("CGGraphSnapping", mCGGraphSnapping); mBezierMode=GetEditorPrefs<CurvyBezierModeEnum>("BezierMode", mBezierMode); mCustomizationRootPath = GetEditorPrefs<string>("CustomizationRootPath", mCustomizationRootPath); mShowAboutOnLoad=GetEditorPrefs<bool>("ShowAboutOnLoad", mShowAboutOnLoad); DT._UseSnapValuePrecision = SnapValuePrecision; }