- In Flax Editor go to
Journal/Source/Journal/
and placeConsoleManager.cs
script in the scene where u want (for example in Scene actor) - Go to
Journal/Content/
dragConsolePrefab
into "ConsolePrefab" field in script - If you want to customize console UI:
- Go to
Journal/Content/
in editor and dragConsolePrefab
on to the scene - In ConsoleManager script set
CreateConsoleFromPrefab
unchecked - Drag console actor to
ConsoleActor
field
- Go to
Like this:
using FlaxEngine;
using Journal;
namespace Game
{
public class Test : Script
{
public override void OnStart()
{
ConsoleManager.RegisterCommand("hello", Hello); // <---
}
public void Hello()
{
Debug.Log("Hello, world!");
// Do something here
}
}
}
- Tab: Selecting hints when editing
- Arrow Up: Get previous commands
- Arrow Down: Get recent commands
- Download, unpack & run Flax Plugin Manager [Click here]
- Select your project & add Journal
- Use this command somewhere in your project folder
git clone https://github.com/Crawcik/Journal.git
(for example in<your-flax-project-path>/Plugins/
)
- Download this project .zip or .tar.gz
- Unpack it in folder near your project (for example
<your-flax-project-path>/Plugins/Journal/
) - Add in your
.flaxproj
file path to plugin, like in this example:
{
"GameTarget": "GameTarget",
"EditorTarget": "GameEditorTarget",
"References": [
{
"Name": "$(EnginePath)/Flax.flaxproj"
},
{
"Name": "$(ProjectPath)/Plugins/Journal/Journal.flaxproj"
}
],
}
- Go to
<your-flax-project-path>/Source/Game/Game.Build.cs
and add "Journal" module, here is example: if you don't want to use commands this is optional
public override void Setup(BuildOptions options)
{
base.Setup(options);
options.PrivateDependencies.Add("Journal"); // Adds reference to Journal types
}
- If something doesn't work: check logs, try deleting
Cache
folder or generate project files manually
Also here is official tutorial for installing plugins: https://docs.flaxengine.com/manual/scripting/plugins/plugin-project.html