Bug - empty data if query FlowFragment runtime

Mon 8. May 2017, 17:12

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));
   }
}
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Bug - empty data if query FlowFragment runtime

Mon 15. May 2017, 09:43

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
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Re: Bug - empty data if query FlowFragment runtime

Mon 15. May 2017, 10:05

Is here some kind of fix shedule or temp workaround about this issue?
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Bug - empty data if query FlowFragment runtime

Mon 15. May 2017, 10:33

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.
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Return to articy:draft Unity Importer

Who is online

Users browsing this forum: No registered users and 14 guests

Who We Are
Contact Us
Social Links