Loading Database failed

Mon 14. Nov 2016, 22:16

I'm getting loads of errors with the Articy importer

System.Exception: Loading Database failed!
at Articy.Unity.ArticyDatabase.get_Instance () [0x00000] in <filename unknown>:0
at Articy.Unity.Editor.ArticyEditor..cctor () [0x00000] in <filename unknown>:0
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])

Exception: Loading Database failed!
Articy.Unity.ArticyDatabase.get_Instance ()
Articy.Unity.Editor.ArticyEditor..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Articy.Unity.Editor.ArticyEditor
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101)
UnityEditor.EditorAssemblies.ProcessEditorInitializeOnLoad (System.Type type) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:123)

Most likely it is just something obvious that I just don't get. How do I get the plugin set up?

"Maniac Manfred" seems to be running fine.

Cheers!

Markku
pengustudios
 
Posts: 3
Joined: Mon 14. Nov 2016, 09:40

Re: Loading Database failed

Tue 15. Nov 2016, 15:36

Hi Markku,

i think the problem here is that you are trying to use the database while there wasn't even once an import. And the plugin tries to access something that isn't there yet. From the looks of your posted stack trace, that would make sense and looks way more severe than it actually is.
Could you please try to export with the beta version of articy:draft using the Unity export option in the Export dialog and saving the export file right into your projects asset folder. From there on, the unity plugin should find the file and import it automatically.
I try to see if can remove the error in this case and show an info to remind the user to export from articy.

And welcome aboard and thanks for testing the plugin for us :)

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: Loading Database failed

Tue 15. Nov 2016, 22:18

Thanks for the reply Nico!

Yeah, I've tried to export from articy:draft3 straight into the project. I've included a screenshot on how far I've gotten. Som3 is the file exported from articy:draft. Unity then made the "Generated" folder. The only thing I can find in the generated folder is the image files from my articy project. In this case localisation and rich text were on at Articy:draft during export.

The errors keep piling up, even after the export. Also, I get access to the Articy menu, but none of the options work. Nothing happens on click. Choosing Window-Articy Database has no effect either. I'm guessing the errors prevent the plugin to do what it wants to do.

My Specs:
Unity Plus 5.4.1f1
project made with Articy:draft 2.4 -> opened & exported from articy:draft 3 beta

What am I missing here? :)

Image
pengustudios
 
Posts: 3
Joined: Mon 14. Nov 2016, 09:40

Re: Loading Database failed

Thu 17. Nov 2016, 11:02

I'm guessing the errors prevent the plugin to do what it wants to do.


You are absolutely right! That was a bug on my end, i fixed the issue and uploaded a new version (30801)!

Thanks for pointing that one out!

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: Loading Database failed

Fri 18. Nov 2016, 11:44

Thanks a lot! It is working now!

A quick question. I'm trying to get access to the name of who is speaking at a DialogueFragment (speaker?) through the DebugFlowPlayer.

So at "public void OnFlowPlayerPaused(IFlowObject aObject)" I see how you have grabbed, for example, the technicalName, displayName & text.

How do I get access to the name of the "speaker" in a string format?

Cheers!

Markku
pengustudios
 
Posts: 3
Joined: Mon 14. Nov 2016, 09:40

Re: Loading Database failed

Fri 18. Nov 2016, 13:15

How do I get access to the name of the "speaker" in a string format?


Code: Select all
public UnityEngine.UI.Text speakerLabel;
public UnityEngine.UI.Image speakerImage;

public void OnFlowPlayerPaused(IFlowObject aObject)
{
   var dlgFragment = aObject as DialogueFragment;
   if(dlgFragment != null)
   {
      var speaker = aObject.Speaker as Entity;
      if(speaker != null)
      {
         speakerLabel.text = speaker.DisplayName;
         
         if(speaker.PreviewImage.Asset != null)
         {
            speakerImage.sprite = speaker.PreviewImage.Asset.LoadAssetAsSprite();
         }
      }
   }
}



First we cast our passed object into a DialogueFragment, and if we are sure it is a DialogueFragment we access its Speaker property casting it to an Entity (Speaker is almost always of type Entity, but a few edge cases made it necessary to have Speaker of type ArticyObject instead of the more convenient Entity). If the cast is successful we can now access its properties. In the example above i set an unity ui label with the speakers displayname and, for the fun of it, access the previewimage, load the asset as a sprite and set it to an ui image.

Hope that helps

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

Return to articy:draft Unity Importer

Who is online

Users browsing this forum: No registered users and 11 guests

Who We Are
Contact Us
Social Links