开发者

How do you create a GUID in Lua script? using LuaPlus if that helps

I am currently working on a project with LuaPlus and I need to be able to use G开发者_Go百科UIDs but cant seem to find them in lua. When I am building data for lua there is no setGUID, there are set number, set string, etc. there is also a Set() function. Does anybody know the proper way to pass GUIDs from c++ to lua and lua to c++. Thank you Very Much.

Update:

Thank you all for your responses. I appreciate the speedy responses. I wont actually be searching through the tables of actors often, mostly just on the front end when we load everything in. However, I am probably worrying a little too much because the game is kind of small and there wont be a large amount of actors anyways. I was thinking of writing an optimized string compare in lua where you check the first char of the GUID against the test actor. If it passes, then move to the second and so one. If it fails then move on to the next actor. I'm hoping by doing an optimized compare like this, I wont have to worry about any speed issues, at least for the game I am working on. Does this sound like a good idea compared to just a normal string compare?


GUID is just 16 bytes. You can pass it as 16 chars for example. Why you need GUID in lua?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜