UDN
Search public documentation:
GKeySDKCH
English Translation
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
虚幻的Logitech游戏G-key SDK
概述
Logitech游戏G-key SDK使得在获支持的Logitech游戏鼠标和键盘上能获得G-key和额外的鼠标按键的当前状态。 它可以很容易地通过使用DLLBind来整合进UDK游戏。 它只在Logitech游戏软件运行时才起作用 (8.30或之后). 在本页面底部找到附加的SDK文件。 请参考SDK的Doc\LogitechGamingGkeySDK.pdf来获得SDK功能的细节。 如有问题/意见,可email cjuncker@logitech.com, 或 lbyrne@logitech.com.
让G-key SDK在您的UDK游戏中发挥作用
以下步骤展示了如何让Logitech SDK与随UDK下载时的 “UDKGame” 一起工作的信息。 请在您的游戏中按照此步骤设置使之能发挥作用。
步骤
- 下载UDK (http://www.unrealengine.com/udk/).
- 创建以下2个虚幻脚本文件,并复制它们到UDK的 Development\Src\MyMod\Classes 目录。
TestDLLGameInfo类扩展GameInfo; defaultproperties { PlayerControllerClass=class'TestDLLPlayerController' }
class TestDLLPlayerController extends PlayerController DLLBind(LogitechGkey); dllimport final function bool LogiGkeyInitWithoutCallback(); dllimport final function bool LogiGkeyIsMouseButtonPressed(int buttonNumber); dllimport final function string LogiGkeyGetMouseButtonString(int buttonNumber); dllimport final function bool LogiGkeyIsKeyboardGkeyPressed(int gkeyNumber, int modeNumber); dllimport final function string LogiGkeyGetKeyboardGkeyString(int gkeyNumber, int modeNumber); dllimport final function LogiGkeyShutdown(); exec function LogiInit() { local bool ret; ret = LogiGkeyInitWithoutCallback(); say("LogiGkeyInitWithoutCallback return is: " $ret); } exec function LogiIsMouseButtonPressed(int buttonNumber) { local bool ret; ret = LogiGkeyIsMouseButtonPressed(buttonNumber); say("LogiGkeyIsMouseButtonPressed return is: " $ret); } exec function LogiGetMouseButtonString(int buttonNumber) { local string buttonString; buttonString = LogiGkeyGetMouseButtonString(buttonNumber); say("LogiGetMouseButtonString: " $buttonString); } exec function LogiIsKeyboardGkeyPressed(int gkeyNumber, int modeNumber) { local bool ret; ret = LogiGkeyIsKeyboardGkeyPressed(gkeyNumber, modeNumber); say("LogiGkeyIsKeyboardGkeyPressed return is: " $ret); } exec function LogiGetKeyboardGkeyString(int gkeyNumber, int modeNumber) { local string gkeyString; gkeyString = LogiGkeyGetKeyboardGkeyString(gkeyNumber, modeNumber); say("LogiGkeyGetKeyboardGkeyString: " $gkeyString); } exec function LogiShutdown() { LogiGkeyShutdown(); say("LogiGkeyShutdown done"); }
- 复制Logitech SDK的 Lib\x86\ LogitechGkey.dll 到 UDK的 Binaries\Win32\UserCode
- 复制Logitech SDK的 Lib\x64\ LogitechGkey.dll 到 UDK的 Binaries\Win64\UserCode
- 打开UDK的 UDKGame\Config\ DefaultEngineUDK.ini 文件以供编辑
- 搜寻: ModEditPackages=MyMod
- 移除行开头的 ;
- 启动 UDK的Binaries/UnrealFrontend.exe
- 运行: 脚本->完全编译
从游戏中调用Logitech SDK的函数
用以下方式启动游戏:- Binaries\Win32\UDK.exe dm-deck?game=MyMod.TestDLLGameInfo
-
LogiIsMouseButtonPressed
-
LogiGetMouseButtonString
-
LogiIsKeyboardGkeyPressed
-
LogiGetKeyboardGkeyString
-
LogiShutdown
-
LogiIsKeyboardGkeyPressed 3 2
下载
- LogitechGkeySDK_1.02.002.1.zip: LogitechGkeySDK_1.02.002.1.zip