Posted by Steve Halliwell
Fungus 3.7 has just been released on the Unity Asset Store and we wanted to take some time here to talk about some of the larger features that are being introduced. Some come as direct requests from forums, such as the WaitForVO option now available on Say Commands. Others, out of a desire to minimize and ease workflow hiccups observed among Fungus developers and newcomers alike. This post will give a brief overview of these additions and some of their use cases.
Firstly, a range of Fungus EventHandlers and Fungus Commands. These will allow you to have a broader range of simple responses and interactions in your games before you need to wrestle with c# scripts.
In 3.7 you can;
- Perform simple mathematical calculations entirely in Fungus using FloatVariables and the new Mathf Commands. There is a MathQuiz scene in the FungusExamples where you can see some of these in action. This will allow fungus to do things like the number guessing game and also allow for games with logic or math based puzzles to have dynamically created starting and ending conditions.
- Respond to a range of MonoBehaviour messages, including collision and trigger messages. You can see some basic examples of how to use these in the MonoBehEvents folder in the FungusExamples. We had requests for creating sound effects when an object collided with another, this and much more is now possible.
Rigidbody2D variable and commands, allow Fungus to add forces to 2d physics objects. These combined with some Vector3 and Transform commands mean that you can now create simple physics driven games entirely within Fungus. The Playground folder in the FungusExamples shows some examples of their configuration and use. These are named so as they are inspired by Unity’s Playground Project. These are far more intricate than the other examples, this readme explains their construction.
You can now shuffle the order of menu options, with the MenuShuffle command and use of the new ‘Hide This Option’ boolean in the Menu command. This will make it easier to conceal choices that are tied to a stance or moral system from your players and can help give players that tend towards always choosing the first or last option more differentiated paths and experiences. The setup can be a little tricky, so the MenuShuffle scene in the FungusExamples gives an indication of its use.
There are also a number of ease of use and quality of life style additions to the editor.
Fungus Icons appear in the hierarchy window on GameObjects that have a Flowchart component. This makes it easier to find these objects in more complex scenes. This behaviour can be turned off in the Fungus Editor Preferences.
Flowchart variables are now shown in Flowchart inspector as well as in the Flowchart Window. This makes it possible to view and/or edit Fungus Variables even if you cannot see the Flowchart Window, which is common for some layouts and computers with less screen real estate to work with.
There is now a search box next to the Add Command button shown when inspecting a block. Typing the name of a category or command will give a list of partial matches, which you can navigate with the arrow keys and confirm by pressing enter. This should be of use to those still getting familiar with the categories a command lives under.