Articy Forum


https://www.articy.com:443/forum/

Bug - empty data if query FlowFragment runtime

https://www.articy.com:443/forum/viewtopic.php?f=46&t=18195

Page 1 of 1

Bug - empty data if query FlowFragment runtime

Posted: Mon 8. May 2017, 17:12
by misterionkell
Hi,
I have strange initialization problem while using ArticyDatabase.GetAllOfType in custom unity editor. If open this custom window and press "Play" after that we catch empty list in ArticyDatabase.GetAllOfType<FlowFragment>(). It`s look like somethink do not initialized. If here some workaround or may be samples about using ArticyDatabase both in editor and runtime?

Code: Select all
public sealed class SampleWindow: EditorWindow
{
   [MenuItem("Articy/BugSample")]
   private static void Open()
   {
        GetWindow<SampleWindow>();
   }
   protected override void OnEnable()
   {
       ArticyDatabase.GetAllOfType<FlowFragment>()
                   .Where(x => x.Parent == null)
                   .ForEach(x => Debug.Log(x.DisplayName));
   }
}

Re: Bug - empty data if query FlowFragment runtime

Posted: Mon 15. May 2017, 09:43
by [Articy] Nico Probst
Hi misterionkell,

i tried your code sample and could reproduce the issue. The problem was the transition from edit mode to play mode and the order of events unity uses, especially mixing editor and game code.
In this case, unitys different "isPlaying" states are not fully set (one is, the other isn't) and i relied on the wrong one in an important part of the called code.

But i fixed it thanks to your report and will be in the next released update!

Best regards

Nico

Re: Bug - empty data if query FlowFragment runtime

Posted: Mon 15. May 2017, 10:05
by misterionkell
Is here some kind of fix shedule or temp workaround about this issue?

Re: Bug - empty data if query FlowFragment runtime

Posted: Mon 15. May 2017, 10:33
by [Articy] Nico Probst
I'm still catching up but when everything turns out ok, i try to release a new version this week.

A workaround could work using OnGUI() delaying any initializations calls.

All times are UTC
Page 1 of 1