All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- The Sort component is now supported since the last official version change - essentially a Choices component where the player must drag and drop the options into a sorted order before submitting. Thanks to theoryofgame for adding this support!
- New
Hackbox.Builders
namespace with some convenience builder-style classes to much more quickly and reliably configure Presets, Components, and States in code. All lower-level code remains intact - this namespace just provides a more friendly higher-level interface to the system. - Added very basic image-based background property mode in the Editor. Should be more friendly now to specify a image with a URL to use as the background for the State or Components.
- Add
ConnectExisting
to Host to allow connecting to an existing room on Hackbox with a given room code and host user ID.
- Add handling of
change
member events (they occur as the user makes changes to a component, debounced by some interval). UseOnValueChange
orValueChangeEvents
to listen for these value change events.
- Updated the parameter defaults for TextInput preset to allow specifying a
type
ofnumber
for constricting to numeric input only (and also allowmin
/max
/step
parameters). - More exception handling code in place to more reliably catch unexpected behaviour should it happen.
- Add
Create
methods to Theme, Preset, UIComponent, and State to avoid having to use ScriptableObject.CreateInstance() each time. (TheState.Create()
isn't strictly needed as it doesn't derive from ScriptableObject, but it's implemented to maintain a consistent creation method naming scheme.) - Add
HeaderBackgroundColor
andMainBackgroundColor
properties to Theme to make it easier to set the backgrounds to solid colors. - Add
HeaderText
,HeaderColor
andHeaderBackground
properties to State to make it easier to initialise/set those parameters.GetHeaderText()
andSetHeaderText()
methods will remain to maintain backwards compatibility.
- Compressed the event foldout in the Host inspector into a scrollview.
- Added
TryGetComponent
on State to access a component much in the same vein asDictionary<T>.TryGetValue
. - Add the
persistent
parameter to TextInput presets & components (https://github.com/devanhurst/hackbox/pull/9).
- Add slightly better room code validation and ownership verification in so it can error out more meaningfully before trying to connect to a non-existent or non-owned room.
- Tweak the regular expression used on the dimension parameter.
- Add new fields (
ConnectOnStart
,ReconnectOnEnable
,DisconnectOnEnable
) to control automatic connect/disconnect behaviour.
- Fix Disconnect event on JavaScript on WebGL builds.
- New tooltips added to help describe parameters.
- Supports new Choices grid display (
grid
,gridColumns
,gridGap
,gridRowHeight
). - Supports
minWidth
/maxWidth
on main part of theme, andminHeight
/maxHeight
on header part.
- Updated parameters in line with latest Hackbox changes.
- Fix for the dimension magic regex.
- Limit hover style parameters to
background
andcolor
only as those are the only ones supported.
- Custom fonts are now supported! Setup the font names in the theme, and then use them as you wish in the preset and component objects!
- Background 'string' drawer now extracted and made more use in other places in the package (namely the Theme main and header backgrounds).
- Helper methods in UIComponent and ParameterList are far more feature complete now. Can get/set parameter and style parameter values far more easily.
- Set the default version for new instances of the Host component to 2 as version 2 is far more feature rich and also fairly stable.
- ParameterList drawer is now foldable, meaning that the inspector doesn't get completely overwhelmed with all of the parameter properties drawing at all times.
- Parameter creation in code is far more friendly now, accepting parameterless constructors and typed constructors for the appropriate types the parameters box around.
- Can now construct states, parameter lists, etc. with object initializers and collection initializers, meaning that code-created elements can take up just a few lines of code now instead of lots of boilerplate-style code being required. The older construction methods are still 100% supported and backwards compatible alongside this new initializer interface.
- Add implicit operator for simple StateAsset to State conversion.
- Fix performance issues on serializing/deserializing JSON.
- Add newer syntax to reduce warnings about deprecated/obsolete APIs on UnityWebRequest.
- Try and fix some style properties not being combined correctly.
- Fix the Host Editor script to allow the new Twitch Required feature to work!!
- Add
twitchRequired
to the room creation POST request, restricting room to only members that have Twitch credentials authenticated.
- Fix components not getting local style being applied in V2 hosted rooms.
- Updated to reflect the new Member data structure proposed by Dev with regards to new Twitch metadata.
- The inspectors for Presets and Components will be more intelligent in the offerings of what parameters are available and where, according to the latest supported fields in Hackbox.
- The Range component is now supported since the last official version change, allowing integer based input, either typed in or as a horizontal slider.
- Hackbox now supports Twitch identity provisioning - the Unity side of things now parses this information and makes it available in each Member if they have logged in with Twitch.
- You can now control the level of debugging from Minimal, to Full, or to Off if you don't want any debugging at all (thanks Royal_Flu$h for the suggestion!). There's also a crude JSON viewer to help debug Member states and how they are getting constructed in the Hackbox Unity system. Oh and, if you're doing really funky debugging stuff, you can also point to a local development URL right in the Host inspector now, rather than having to spelunk into the code to do that!
- Added WebGL implementation for socketio via jslib.
- Slight update to Host component Editor appearance.
- JSON construction/deconstruction rewritten in places to support non-reflection platforms like WebGL.
- Refactored SocketIO code to now have platform implementations for Standalone, Editor, and WebGL.
- Added debugging option to log some extra information out, such as ping/pong event calls and raw JSON that is sent/received.
- Added
OnRoomReconnecting
,OnRoomReconnectFailed
, andOnPingPong
events.
- Now depends on updated socket.io-client-csharp v3.0.6 (newtonsoft-json branch).
- Updated version now correctly makes disconnect and reconnect calls.
- Updated reconnect logic to send latest updated member states on reconnecting.
- Updated logging.
- Fixed style parameters not being correctly cloned in state objects, which lead to UIComponents not inheriting their styling.
- Added
key
member to UIComponent, so that individual component state can be persisted across a full state change. Will only populate the "key" value in the JSON if the value is not empty and not null.
- Style parameters have been migrated to a new fields in the serialized data. Checking through your StateAsset objects should be enough to migrate the appropriate parameters into the style parameters field.
hover
has been moved to a style parameter.- In version 2+ hosting, each individual Choice can now be styled with the new style field per choice.
- Fixed state payload definition so that it now sends a correctly versioned payload. (Reminder: Change the version field on the Host component to change what version state payload is sent.)
hover
,submit
, and other ParameterList parameter inspectors have been fixed and should now be visible.
- Initial update to attempt version 2 state payloads. Change the version field on the Host component to change what version state payload is sent.
- Style parameters have been migrated to a new fields in the serialized data. Checking through your StateAsset objects should be enough to migrate the appropriate parameters into the style parameters field.
- Fix a bug in GetMemberByID which compared against the gameobject name instead of the userID parameter.
- Added
padding
andmargin
styling parameters.
- Fixed assembly definitions so that the package should be more "plug & play" and should no longer complain about Unity Editor dependencies for runtime builds.
- First release with fixes to Unity Editor inspector problems.