All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Default constructors for
IntegerRange,FloatRangeandVector3Range
AsyncLockhelper class to work as an awaitable and disposable semaphore.
- Fixed some formatting issues in the readme.
- Add ScriptableSingletonFileReloader: reloads the instance of the target scriptable singleton when the file is modified outside of Unity
- Update package display name from
FC - Common CodetoCommon Code - Update CHANGELOG formatting
- Added
MultiSelectDropdownclass and inheritors to help creating editor dropdowns to select multiple items.
- Add utility functions for the inspector:
- InspectorUtils.SetIndentScope: use EditorGUI.IndentScope to set the editor GUI indent level
- InspectorUtils.DrawHelpbox: draw a helpbox with the specified message and severity at given position
- Add RectExtensions class: provides extensions functions for Rect
- Update SubAssetPicker drawer to display mixed values and disable picker when multiple objects with different values are selected
- Fix SubAssetPicker would not work with items of serialized lists and arrays
- Fix SubAssetPicker would not search for derived classes in other assemblies than the base type's assembly
- Fix tried to show the SubAssetPicker context menu as many times as there are derived types
- Path used in CreatePrefab is now relative to project folder.
- Add
OnDestroymethod to setSingletonstatic instance to null when object is destroyed, this fixes a memory leak when destroying singletons
- Add
SerializableInterfacestruct: used to reference objects that implement a specific interface - Add
CustomObjectField: used to draw customized object field with more functionality thanEditorGUILayout.ObjectField
- Moved
HideInCreateAssetDropdownAttributeinsideFishingCactus.CommonCodenamespace
- Add
HideInCreateAssetDropdownAttribute: scriptable object classes that define this attribute are hidden in the create asset dropdown
- Fix an null ref exception inside
MathematicsVectorContextMenuthat prevented context menus from being displayed on specific properties on certain components (eg: rotation property onTransform)
- Summary in readme
- Files reorganized
StringHelpermethods are now extensions inStringExtensions- Utility script names are more consistent
- Namespaces added or updated from
FishingCactustoFishingCactus.CommonCode
- Add
MATHEMATICS_AVAILABLEsymbol whencom.unity.mathematicsis used for code that depends onMathematics
- Add
ReflectionUtilitiesstatic class- Get implementation types from base type
- Create instances of implementation types from base type
- Add
SelectImplementationDropdownto select the implementation of a base type in the inspector - Add property context menu utilities scripts:
- Add
IPropertyContextMenuCallbackandPropertyContextMenuCallbackFetcherto make it easier to add custom property context menus - Add
CreateAssetContextMenuto quickly create scriptable objects by selecting an implementation - Add
VectorContextMenuto quickly set values of vectors
- Add
- Add
HierarchyScriptDropHandlerwhich allows people to drag and drop scripts inside the scene hierarchy to directly create an empty game object with the script attached - Add
ReorderableSubAssetListwhich allows to create sub assets in a list by selecting the implementation - Add
HierarchyUtilitieswith utility functions to rename and create game objects in the scene hierarchy - Add utility functions in
InspectorUtilitiesto get the type of a serialized property that works for lists and arrays
- Update .editorconfig
- correct indentation for brackets inside switch-cases
- suggest empty line after code blocks
- suggest brackets for code blocks statements
- suggest snake_case for local variables and parameters
- Add publish config in package.json
- Changed
SerializableDictionary.KeyCollectionimplementation of ICollection.Contains to not be explicit (public) - Changed
SerializableDictionary.ValueCollectionimplementation of ICollection.Contains to not be explicit (public)
- Optional.TryGetValueOrDefault now uses "default" as a default parameter value
- Add structs for readonly and garbage free iterating over commonly used collections:
- ReadOnlySerializableDictionary
- ReadOnlyList
- ReadOnlyDictionary
- ReadOnlyHashSet
- ReadOnlyQueue
- ReadOnlyStack
- No more memory is allocated when iterating with a foreach loop over SerializableDictionary, or its Key or Value properties
- This uses custom enumerators structs types which handle the enumeration
- No more memory is allocated when getting the keys and values collections of a SerializableDuctionary
- This uses custom KeyCollection and ValueCollection types similarly to what is done in .NET dictionaries
- FloatRange and IntegerRange drawers: toggle on label click
- Add Optional::TryGetValueOrDefault function
- Add .editorconfig for VS users
- Add SubClassPicker attribute
- Doc comment for MathMod + rectify the example
- Add CustomPropertyDrawer attribute to EnumDictionary's property drawer
- Add NetworkStatusChecker to check for Internet availability
- Add missing namespace around SerializableDictionary class.
- Singleton: add option for destroy on load.
- Add EnumHelper GetToggledFlagsCount & Clamp IComparable functions.
- Add mathmod function.
- CreateNewPrefab tools : folder selection added, last used folder path stored in EditorPlayerPrefs.
- SerializableDictionary: add explicit implementation of IReadOnlyDictionary
- Add implicit operator to create an enabled Optional from a T value
- Add method to EnumHelper to get a random value in a specific range
- Fix EnumDictionary foldout & position.
- Remove Task delegate because useless and was preventing System.Threading.Tasks.Task to be used in FishingCactus without specifying the whole path.
- Add Max attribute for integer and float fields and Optional helper struct
- Fix SerializableDictionary setter bug for existing keys
- Add WizzardUtils.DisplayPathSelector().
- Add SerializableDictionary utility.
- First version of the package.