03/18/2016 – Update v6.9 Scripting Improvements & Beta Unity 5 Build!

This update is a two-parter, the first focusing on the changes in the live build (all scripting) and the second is a beta branch you can opt in to, to test out Tabletop Simulator in Unity 5 (with all the regular updates as well)! Please check it out and let us know in this thread or this one of any bugs, issues, etc that you find. The more people who test it out and let us know of any problems, the faster we can get it working and implemented into the live build. Also, people on Unity 5 will be able to play with those on the live build. This is our initial upgrade to Unity 5 with all the same graphics. We’ll be looking into physics-based rendering in the future. Keep an eye out.

Thanks for your help and hope you like the changes!

Live Build:

Scripting Improvements

Fixed getSeatedPlayers(). Deep copy of playerlist now.

Reordered parameters on setGlobalScriptTable().

Fixed setTable(). It wasn’t working right in the first place.

Fixed setGlobalScriptTable(). It wasn’t working right in the first place.

getPointerPosition() and getPointerRotation() now return nil if passed a player color that is not seated

colorToPlayerName() now returns nil if the player color is not seated and lets execution of the script continue.

Removed error message from getObjectFromGUID(). It just returns nil which the scripter can check for.

onPlayerTurnStart() is now called after player clicks OK in hotseat mode.

Added “Global” global reference to Object and Global. Should only be used for referencing things that the Global Script owns.

takeObject() called from a deck will now take the top card and not the bottom by default.

Added optional parameter to takeObject() for deck that will take from either the top or the bottom. Defaults to top.

Fixed setRotationSmooth() and rotate() for (0, 0, 0).

Objects taken from a container default to the rotation of the container if no rotation is provided in the parameters. If you set the rotation on a card but want to keep it facing (up/down) the same way as the deck, set the z component in the rotation parameter to the the z component of the deck via deck.getRotation().z.

onObjectDestroyed() now has the object reference as a parameter. It has 1 frame left to live. It fires immediately before the object’s onDestroy() event.

Added getButtons() to LuaGameObjectScript.

Added removeButton() to LuaGameObjectScript. It takes a frame for the button to be removed so multiple buttons can be removed in the same frame with their indices being preserved. In the following frame, the indices of any existing buttons are updated to their new locations as children on the object.

Added editButton() to LuaGameObjectScript.

Calling getObjects() on a deck now returns a list of the cards with their indices inside the deck.

takeObject() can remove a card from a deck based on its index in the deck.

Beta – Unity 5:

These are the changes that are different from the live build and Unity 5. To opt in to the beta, right click on Tabletop Simulator in your Steam library, then click Properties. There will be a new “Betas” tab. At the drop down menu choose “beta – Unity 5”. If it asks for a code, you can ignore it, as you will get the download. You will need to opt out of beta again to get back to the live build, but all players can play with one another, regardless.

Improvements:

Overall performance improvements.

Physics stability and performance.

Objects will no longer go through each other.

Optimized many scripts for improved performance.

Stutter reduction.

Greatly improved the accuracy of auto raise.

Zones (Hidden, Lua, etc.) are now much more reliable.

Increased the number of objects that can be selected / grabbed from 64 to 128.

UI should be much more responsive.

Box select now works properly when 3D Text is selected.

Limitations:

Concave/Nonconvex colliders are only supported for locked objects.

Touch input is currently disabled for porting to Unity 5.

Tablet screen is not working.

All sounds aren’t working on Linux.

LINUX USERS: Add -force-opengl to the launch parameters otherwise the game will crash. This is a Unity bug in Unity 5 that Unity is planning on fixing at some point.