io.extendreality.malimbe
Advanced tools
Comparing version 1.3.1 to 2.0.0
# Changelog | ||
# [2.0.0](https://github.com/ExtendRealityLtd/Malimbe/compare/v1.3.1...v2.0.0) (2019-01-07) | ||
### Bug Fixes | ||
* **Runner:** don't leak for already processed assemblies ([159e88a](https://github.com/ExtendRealityLtd/Malimbe/commit/159e88a)) | ||
* **Runner:** gracefully fail for unfound assemblies ([f0b60f9](https://github.com/ExtendRealityLtd/Malimbe/commit/f0b60f9)) | ||
* **Runner:** prevent access to disposed closure ([8ead72b](https://github.com/ExtendRealityLtd/Malimbe/commit/8ead72b)) | ||
* **SerializedProperty:** help serializing properties, not fields ([40b6511](https://github.com/ExtendRealityLtd/Malimbe/commit/40b6511)) | ||
* **UnityIntegration:** only weave each assembly once ([cbfd2e8](https://github.com/ExtendRealityLtd/Malimbe/commit/cbfd2e8)) | ||
* **UnityIntegration:** unnecessary creation of an intermediate list ([6d65c74](https://github.com/ExtendRealityLtd/Malimbe/commit/6d65c74)) | ||
* **UnityIntegration:** weave all assemblies on load ([d23bacb](https://github.com/ExtendRealityLtd/Malimbe/commit/d23bacb)) | ||
### Features | ||
* **UnityIntegration:** allow weaving all assemblies manually ([b87448b](https://github.com/ExtendRealityLtd/Malimbe/commit/b87448b)) | ||
* **UnityIntegration:** show progress when weaving all assemblies ([2f1bb4c](https://github.com/ExtendRealityLtd/Malimbe/commit/2f1bb4c)) | ||
### BREAKING CHANGES | ||
* **SerializedProperty:** Fields can no longer be "changed" into properties. | ||
Instead of using a field and annotating it with | ||
`FieldToPropertyAttribute` use a property and annotate it with | ||
`SerializedPropertyAttribute`. Auto-implemented properties as well | ||
as regular ones are supported and the only requirement is to have a | ||
getter and setter (of any accessibility level). | ||
## [1.3.1](https://github.com/ExtendRealityLtd/Malimbe/compare/v1.3.0...v1.3.1) (2019-01-06) | ||
@@ -4,0 +33,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "A collection of tools to simplify writing public API components in Unity.", | ||
"version": "1.3.1", | ||
"version": "2.0.0", | ||
"unity": "2018.1", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -41,11 +41,11 @@ [![Malimbe logo][Malimbe-Image]](#) | ||
</Malimbe.FodyRunner> | ||
<Malimbe.FieldToProperty/> | ||
<Malimbe.SerializedProperty/> | ||
<Malimbe.ClearPropertyMethod> | ||
<NamespaceFilter>^VRTK</NamespaceFilter> | ||
<NamespaceFilter>^My.Namespace.Example</NamespaceFilter> | ||
</Malimbe.ClearPropertyMethod> | ||
<Malimbe.ValidatePropertiesMethod> | ||
<NamespaceFilter>^VRTK</NamespaceFilter> | ||
<NamespaceFilter>^My.Namespace.Example</NamespaceFilter> | ||
</Malimbe.ValidatePropertiesMethod> | ||
<Malimbe.XmlDocumentationToFieldTooltip> | ||
<NamespaceFilter>^VRTK</NamespaceFilter> | ||
<NamespaceFilter>^My.Namespace.Example</NamespaceFilter> | ||
</Malimbe.XmlDocumentationToFieldTooltip> | ||
@@ -74,6 +74,11 @@ </Weavers> | ||
* `FodyRunner.UnityIntegration`: Weaves assemblies in the Unity Editor after Unity compiled them as well as builds. The weaving is done by utilizing `FodyRunner`. | ||
* The library just needs to be part of a Unity project (configured to only run in the Editor) to be used. It hooks into the various callbacks Unity offers. | ||
* `FieldToProperty.Fody`: A Unity-specific weaver. Creates a property for all fields annotated with `[BacksProperty]`. If a `T SetFieldName(T, T)` method exists it will be called in the property's setter. Adds `[SerializeField]` to the field if not yet specified. | ||
* Annotate a field with `[BacksProperty]` to use this. | ||
* Optionally write `T SetFieldName(T, T)` methods that act as a setter replacement on the same type that declares the field (of type `T`). The accessibility level of the method doesn't matter and the name lookup is case insensitive. | ||
* There is no need to manually run the weaving process. The library just needs to be part of a Unity project (configured to only run in the Editor) to be used. It hooks into the various callbacks Unity offers and automatically weaves any assembly on startup as well as when they change. | ||
* Once the library is loaded in the Editor a menu item `Tools/Malimbe/Weave All Assemblies` allows to manually trigger the weaving process for all assemblies in the current project. This is useful when a `FodyWeavers.xml` file was changed. | ||
* `SerializedProperty.Fody`: A Unity-specific weaver. Ensures the backing field for a property annotated with `[SerializedProperty]` is serialized. If a `T SetPropertyName(T, T)` method exists it will be used in the property's setter before existing instructions. | ||
* Annotate a property with `[SerializedProperty]` to use this. Note that the attribute's constructor allows specifying whether the backing field should be hidden in the Unity inspector (false by default). Hiding the _property_ from the inspector (e.g. in the UnityEvent listener picker) is not supported by Unity. | ||
* Optionally write `T SetPropertyName(T, T)` methods that act as a setter addition on the same type that declares the property (of type `T`). A call to this method will be added to the _start_ of the existing setter. The accessibility level of the method doesn't matter and the name lookup is case insensitive. | ||
* If the property's backing field doesn't use `[SerializeField]` it will be added. | ||
* If the property is an [auto-implemented property][Auto-Implemented Property] the backing field will be renamed to match the property's name for viewing in the Unity inspector. Since C# doesn't allow multiple members of a type to share a name the backing field's name will differ in the first character's case. E.g.: | ||
* `int Counter { get; set; }` will use a backing field called `counter`. | ||
* `bool isValid { get; private set; }` will use a backing field called `IsValid`. | ||
* `ClearPropertyMethod.Fody`: A generic weaver. Creates `ClearProperty()` methods for any property that is of reference type and has a setter. Sets the property via its setter to `null` in this new method. | ||
@@ -87,3 +92,3 @@ * The weaver only runs on types that match a namespace. Specify the namespaces to act on via (multiple) XML _elements_ called `NamespaceFilter`. The elements' values are used as ([.NET Standard's][Regex]) regular expressions. | ||
<Malimbe.ValidatePropertiesMethod MethodName="Validate"> | ||
<NamespaceFilter>^VRTK</NamespaceFilter> | ||
<NamespaceFilter>^My.Namespace.Example</NamespaceFilter> | ||
</Malimbe.ValidatePropertiesMethod> | ||
@@ -97,4 +102,4 @@ ``` | ||
```xml | ||
<Malimbe.XmlDocumentationToFieldTooltip FullAttributeName="Some.Namespace.DocumentationAttribute"> | ||
<NamespaceFilter>^VRTK</NamespaceFilter> | ||
<Malimbe.XmlDocumentationToFieldTooltip FullAttributeName="Some.Other.Namespace.DocumentationAttribute"> | ||
<NamespaceFilter>^My.Namespace.Example</NamespaceFilter> | ||
</Malimbe.XmlDocumentationToFieldTooltip> | ||
@@ -134,9 +139,8 @@ ``` | ||
[Releases]: ../../releases | ||
[CD]: https://dev.azure.com/ExtendReality/VRTK/_build/latest?definitionId=2 | ||
[SemVer]: https://semver.org/ | ||
[VCS]: https://en.wikipedia.org/wiki/Version_control | ||
[UPM-Instructions]: https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.1/manual/index.html#extpkg | ||
[SemVer-Build]: https://semver.org/#spec-item-10 | ||
[FodyWeavers]: https://github.com/Fody/Fody#add-fodyweaversxml | ||
[Regex]: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expressions | ||
[Auto-Implemented Property]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties | ||
@@ -143,0 +147,0 @@ [Fody's naming]: https://github.com/Fody/Fody#naming |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
151
712001