Cannot Reproduce

losing references to reflected methods when using Lists

MrFox 3 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 6

Hello - 

just starting using/evaluating Bolt for use in our work flow.  Great interface and intuitive.

I am having a problem where it seams i loose my references to methods.  I've noticed that this occurs when using Lists.

I have two methods signatures:

  1.  One that takes int parameter 

  2. One that takes a List<> parameter.

References to methods are lost after a recompile is induced. Note that this recompile does not change the method signature referenced by the Bolt Units.  I've attached a video of the observed issue.  

Is this a bug or am i missing something here?  Again, I am new to Bolt so please pardon this message if I made an incorrect assumption or missed something.

Thanks for your help here.  


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Wes!

Sorry you're having this issue. That does indeed seem like a bug.

Can you open the graph inspector with the failed-to-reflect unit? It should have an exception message displayed. If you click it, the full exception will be logged to the console. Please paste the entire log (stack trace) that results so I can see what's going on!

Hi Lazio,

Thanks for the quick response. 

I've attached some details here.  Please me know if you need anything else.

The two test methods are in a class that extend from Monobehavior. TestB's reference is preserved fine, but Test1 reference is lost after a recompile.  There are no changes to the code base between recompiles.

Targetable is a Monobehavior as well. 

Hope it helps :)


MissingMemberException: No matching method found: 'TargetSearchAPI.TestA_FilterTargetsMinDistance (Vector3)'
Ludiq.Member.ReflectMethod () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/Member.cs:684)
Ludiq.Member.Reflect () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/Member.cs:625)
Ludiq.Member.EnsureReflected () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/Member.cs:694)
Bolt.MemberUnit.ReflectMember ()
Bolt.Warning:OnGUI(Rect) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Description/Warning.cs:142)
Bolt.UnitEditor:OnGUI(Rect, GUIContent) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Units/UnitEditor.cs:135)
Ludiq.Inspector:Draw(Rect, GUIContent) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Inspection/Inspector.cs:93)
Ludiq.LudiqGUI:Editor(Metadata, Rect) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:102)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Also i've noticed a lot of warnings in the Unity debug console:

Unable to find type: 'System.Collections.Generic.List`1[[UnityEngine.Tilemaps.TerrainTile, Assembly-CSharp, Version=1.0.6690.24924, Culture=neutral, PublicKeyToken=null]]'.
Use the [Renamed] attribute when changing type names.
Ludiq.RuntimeCodebase:DeserializeType(String) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/RuntimeCodebase.cs:70)
Ludiq.Codebase:DeserializeType(String) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Reflection/Codebase.cs:164)
Bolt.LiteralOption:Deserialize(UnitOptionRow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Framework/Codebase/LiteralOption.cs:33)
Bolt.UnitOptionRow:ToOption() (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitOptionRow.cs:43)
Bolt.UnitBase:Load() (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitBase.cs:94)
Bolt.UnitBase:AutoLoad() (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Editor/Options/UnitBase.cs:35)
System.Reflection.MethodBase:Invoke(Object, Object[])
Ludiq.<>c__DisplayClass0_0:<.cctor>b__4() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Threading/BackgroundWorker.cs:55)
Ludiq.BackgroundWorker:Work() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Threading/BackgroundWorker.cs:142)

Not sure if these are released to the issue:

Thanks for the additional info. I will investigate... It seems like Bolt has trouble deserializing generic List<> types, which makes it ignore the first argument for your method, and thus can't find the matching signature.

Working on Fix

Will attempt to fix in 1.4!

Cannot Reproduce

Hi MrFox!

I've attempted to reproduce this with the following code:

using System.Collections.Generic;
using UnityEngine;
public class Targetable
public class ExampleScriptableObject : ScriptableObject
    public int TestB_GetStuffTest(float f, float y)
        return 0;
    public void TestA_FilterTargetsMinDistance(List<targetable> input, Vector3 posiution)

However, units still work, no reference loss (even after compiling/entering/exiting playmode):

Closing as cannot reproduce for now. If you have minimal steps for reproduction that can cause the issue, let me know.