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));
}
}