Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Error message with Fungus Plugin

Discussion in '2D' started by moustidaros, Mar 7, 2019.

  1. moustidaros

    moustidaros

    Joined:
    Mar 7, 2019
    Posts:
    1
    Hello. So I'm having a game on Unity created with Fungus (a plugin that makes it easy to create 2D, story driven games). My task is to recreate in a newer Unity version. So I downloaded Unity 2018.3.6f1. The original game was on 5.6.0f3.

    So, I've created the characters, the rooms, the GUI and I was ready to use Fungus to start creating the story. But Unity won't let me create stories because whenever I click the '+' button to add Narrative I get this error:

    NullReferenceException: Object reference not set to an instance of an object
    Fungus.EditorUtils.BlockEditor.GetFilteredCommandInfoAttribute (System.Collections.Generic.List`1[T] menuTypes) (at Assets/Fungus/Scripts/Editor/BlockEditor.cs:492)
    Fungus.EditorUtils.CommandSelectorPopupWindowContent.GetFilteredSupportedCommands (Fungus.Flowchart flowchart) (at Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs:82)
    Fungus.EditorUtils.CommandSelectorPopupWindowContent.ShowCommandMenu (UnityEngine.Rect position, System.String currentHandlerName, Fungus.Block block, System.Int32 width, System.Int32 height) (at Assets/Fungus/Scripts/Editor/PopupContent/CommandSelectorPopupWindowContent.cs:73)
    Fungus.EditorUtils.BlockEditor.DrawButtonToolbar () (at Assets/Fungus/Scripts/Editor/BlockEditor.cs:322)
    Fungus.EditorUtils.BlockInspectorEditor.DrawCommandUI (Fungus.Flowchart flowchart, Fungus.Command inspectCommand) (at Assets/Fungus/Scripts/Editor/BlockInspector.cs:152)
    Fungus.EditorUtils.BlockInspectorEditor.OnInspectorGUI () (at Assets/Fungus/Scripts/Editor/BlockInspector.cs:132)
    UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    --
    The weirdest thing is that sometimes, for some reason, it can work correctly but usually it doesn't. I suspect that whenever I open the older Unity version with the first version of the game and after that open the newer version, it's OK. But if I close Unity and reopen it, I get the errors.

    Can anyone help?
     
  2. Gamenotcore

    Gamenotcore

    Joined:
    Nov 2, 2015
    Posts:
    2
    I am having this problem as well, it seemed for some reason that the method that fungus calls to cache commands was not being called.

    I have had it work by reimporting all assets via Assets->Reimport All but it did not work after I reopened the project.

    What seems to be happening is that Fungus may be relying on script refreshing via DidReloadScripts attribute, which looks like it is not being called at the start upon opening a project.

    The solution for now seems to be toggling on and off Play to force the scripts to initialize so you can use the Fungus menus.

    Edit: this seems to have been fixed with Fungus 3.11.2
    Edit 2: Some caching errors not have been fixed.
     
    Last edited: Apr 25, 2019
    jiuyuezai and krisss like this.
  3. pharaway

    pharaway

    Joined:
    Nov 30, 2018
    Posts:
    6
    nah, still happens...just came here because of it and sure enough hitting play once and then checking again let me access the flowcharts.
     
  4. Gamenotcore

    Gamenotcore

    Joined:
    Nov 2, 2015
    Posts:
    2
    I thought it was fixed because the errors I was running into disappeared. But there seems to be some remaining caching problems.
    One I noted was a Flowchart Block's "Execute On Event" dropdown. It does not crash but it does not show options until you toggle play once.
     
  5. wechat_os_Qy00kxc8U6dtLEpQlvkYI8PKE

    wechat_os_Qy00kxc8U6dtLEpQlvkYI8PKE

    Joined:
    Feb 27, 2020
    Posts:
    1
    Why I can't add portraits for my characters? (There's no "+" sign)
     
  6. Tijnz

    Tijnz

    Joined:
    Jul 20, 2018
    Posts:
    2
    Missing this too! The pictures on the guides don't look like mine.
    Just has a dropdown for portraits, size, portraits face (default:FRONT) and not a + sign :(
     
  7. Tijnz

    Tijnz

    Joined:
    Jul 20, 2018
    Posts:
    2
    Ok. Guess I got it after all.
    Click on the Portraits dropdown, fill in the size, then SIZE lights up blue, click on that and you can add a sprite