Hey everybody! Another great release kicking in with tons of stuff for you to play with! But this time we included a major Lua overhaul which will now use the actual unity UI instead of the old OnGUI. This new UI system is way faster and better then the old for many reasons. The old OnGUI functions will now be deprecated and removed in the futur. A long list of functions has been added to give you the functionality that we have with Unity. That list can be found on this API document. Since this will bring some new stuff that you might have not seen before while programming with Lua, i'm also giving you guys a detailed example of how to use some of this new functions. You should be able to create your own things afterward. Download the Lua Demo NOTE: I forgot to add the parentKind in the demo as variable to save along with parentID. It's really important if you want to assign the id to the object kind you are trying to access. If you have any question or see any bugs, please report!
Added a few more function yesterday after hearing some players demand. Updated API Doc with the new function and created this small script. Enjoy Spoiler: Example Code: function ShroudOnStart() local currentDeck = ShroudCurrentDeck(); ConsoleLog(string.format("Current Deck ID: %s Name: %s", currentDeck.id, currentDeck.name)); local cardList = ShroudGetDeckCardList("Blades"); if cardList then for i,v in pairs(cardList) do ConsoleLog(string.format("Deck Card ID: %s Name: %s Qty: %s", v.id, v.name, v.quantity)); end end local deckList = ShroudDeckList(); if deckList then for i,v in pairs(deckList) do ConsoleLog(string.format("Deck Name: %s Qty Cards: %s", v.name, v.quantity)); end end local emoteList = ShroudEmoteList() if emoteList then for i,v in pairs(emoteList) do ConsoleLog(string.format("Emote Name: %s ", v)); end end ShroudPlayEmote("Akimbo"); end Edit: forgot to mention i did this script super fast, its in ShroudOnStart, and lua might load before your player do and wont show stats. Make sure to do /lua reload once you are in the game to see it!
Here is a useful link to understand anchor and pivot and what is a "Rect" in UI language etc. Check it out! https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/UIBasicLayout.html
Best place to report a possible bug with ShroudOnMouseClick? Is it supposed to trigger 5 times on one left click? Also, don't suppose you can modify it to handle other types of clicks?
There is some bug currently in lua using multiple script that doesnt have the same function, that cause problem but will be fixed in next release i just fixed it. There also another problem i saw with my new UI which doesnt stick when loading a new scene, which then cause a lost of all ids and you cant manipulate the UI anymore, will also be fixed in next release (18 november!) Ill check throw back some event data with the mouseclick to know if its left right or middle click etc