The full release of a complete rewrite of VespaIO. This new version of VespaIO introduces many exciting features including nonstatic commands, field support, property support, and autofill!
Added
- Added public methods to the
Aliases
class to add support for adding, removing, and viewing alias definitions within your own code. - Added public methods to the
Commands
class to add support for adding, removing, and viewing command definitions within your own code. - Added various low level types to more clearly communicate command syntax and invocations.
- Added the JetBrain's
[MeansImplicitUse]
attribute to attributes to automatically supressMethod never used
intellisense warnings for commands. - Added support for
Word[]
commands which can dynamically handle any amount of parameters.- If this parameter is ever present it will always be invoked.
- Added support for autofilling subjects and parameters in console input
- Added support for command definitions on Fields and Properties.
- Does not require writing any methods to function!
- Supports autofill for the get value and can set value if not readonly.
- Added support for instanced (non-static) commands on any class that inherits from
UnityEngine.Object
- The first parameter will be used to specify the name of the object to be targeted.
- Only one Object can be the target of a method. The first object found will be used.
- This works for methods, fields, and properties.
- Added
LogStyling
parameter to theConsole.Log
method which will apply common styling such as warning or error formatting. - Added
VESPA_DISABLE
define symbol which when present will remove core functionality of the console. Not present by default - Added
VESPA_DISABLE_NATIVE_COMMANDS
define symbol which when present will remove the native commands that come with the console. Not present by default.
Breaking Changes
- The entire asset has been rewritten from the ground up so consider your previous implementations completely broken with this major version.
- The codebase has been restructured as follows:
- Part of the codebase has been separated into a
LLAPI
which handles a lot of the heavy lifiting of the asset- If you do not plan to extend console functionality you should amost never need to interact with
LLAPI
, but it is available if that is of interest to your project.
- If you do not plan to extend console functionality you should amost never need to interact with
- Some code and assets that were related to the default implementation such as
DevConsoleRunner
have been moved toSamples
- If you were using any 1.X version you likely need to import this default console implementation.
- The rest of the codebase lies within the
HLAPI
which provides the same intuitive console implemntation from 1.X versions- Because of this separation of
LLAPI
fromHLAPI
it is possible to import exclusively theLLAPI
if you want to write your own console implementation.
- Because of this separation of
- Part of the codebase has been separated into a
ManualPriority
forCommands
are now of typeint
instead ofbool
enabling finer tuning of the sorting of the help manual.- Native commands will only use the inclusive range of
0-127
so if you want to guarantee your command shows before or after native commands consider this range.
- Native commands will only use the inclusive range of
- By default: Assemblies that are incredibly unlikely to contain commands are no longer included in the command search
- This specifically ignores assemblies that begin with
unity
,system
,mscorlib
,mono
,log4net
,newtonsoft
,nunit
,jetbrains
(Case insensitive). - In testing this reduces command search time by an order of magnitude
- If for some reason this behavior is undesirable you can revert to the old behavior
- This specifically ignores assemblies that begin with
- Enforcement of key definition rules are now much more strict that before so invalid command or alias keys may register differently to the console.
- As a reminder: Keys should only use chracters from a-z, 0-9, and the
_
character. - Any keys that violate these rules will be converted to a valid key by going to lower case, replacing spaces with the
_
, and removing other invalid characters.
- As a reminder: Keys should only use chracters from a-z, 0-9, and the
- The text parser for console input has been completely rewritten. It follows very similiar syntax to before but may have slightly different behavior from before including:
- By default a command is invoked by space separated words. Each word will be translated into a method parameter later.
- If you would like to include a space in a parameter begin a quote using the "" character.
- Only the first set of quotations will be removed
- You can escape the quote character using
\"
to ignore this behavior
- You can begin a new command definition by using the semicolon character
- You can escape the semicolon character using
\;
to ignore this behavior - Semicolons within quotes will not begin a new command.
- You can escape the semicolon character using
StaticCommand
is nowVespaCommand
since it now supports non-static methods and more.- As stated above the original
DevConsoleRunner
implementation (including its assets) has been moved into the project samples.- If you did not already have your own console implementation imported into your Asset folder you are required to import this sample to use the console again.
- Some
ConsoleSettingsConfig
values that were only relevant to theDevConsoleRunner
have been moved onto theDevConsoleRunner
itself.
Removed
- The
LongString
type has been completely removed in favor of using quotation blocks around command input.- This means that previous LongString methods now take a string input and you are required to put quotations around your phrase.
- Alternatively you can use
Word[]
to handle a dynamic amount of words.
- The default
DevConsoleRunner
and its assets have been moved toSamples
- This requires an import in order to use the console out of the box.