This feature is now formally implemented in Resonite, this mod is no longer needed.
Note: Since an official mod loader is not in place, this one will link to the mod loader created by Rucio and Stiefel. Once an official one comes out (perhaps a collab between all forks), then we will replace the URL below.
A ResoniteModLoader mod for Resonite that adds additional resolution steps when adding a generic in the AttachComponent
dialog. The original Resonite resolution pattern is still intact with this mod as this only comes into play if the built-in type resolver failed to find a candidate type.
The additional resolution steps for a type name are as follows:
- If a name starts and ends with
[
and]
, the Resonite default resolver is used. - The name is compared against well known types.
ex:float
,sbyte
,int
- If the name ends with
?
, the inner type is resolved using these steps recusively. If the resolved type is a struct, that type wrapped inSystem.Nullable<T>
is returned, else no type is resolved. - The name is checked against well known assemblies:
4.1. The name is a strongly named type in the assembly, without needing the assembly name itself (this solves needing Element.Core everywhere)
ex:Element.Core.float4
,FrooxEngine.ITextField
,System.String
4.2. The name is prepended with a list of well known namespaces in each assembly.
ex: names will be prepended withElement.Core
as part of checking theElement.Core
assembly,FrooxEngine.
andFrooxEngine.ProtoFlux.
when checking theFrooxEngine
assembly. This strongly resolves types likefloatQ
asElement.Core.floatQ
, or some core flux nodes. - If the name itself contains generic arguments wrapped with
<
and>
, all steps are repeated recursively.
ex:IField<IField<floatQ>
resolves toFrooxEngine.IField<FrooxEngine.IField<Element.Core.floatQ>
.
- Install ResoniteModLoader.
- Place GenericTypeType.dll into your
rml_mods
folder. This folder should be atC:\Program Files (x86)\Steam\steamapps\common\Resonite\rml_mods
for a default install. You can create it if it's missing, or if you launch the game once with ResoniteModLoader installed it will create the folder for you. - Start the game. If you want to verify that the mod is working you can check your Resonite logs.