I love to make game with UE4 so much, and I’d like to make it better with UE users and developers. I’m making a game which I think a custom hardware cursor is necessary.
I make a UWG and set hardware cursor in Project Settings → User Interface → Hardware Cursor, all goes well but, it becomes the Windows native cursor in the packaged project.
Then I read the source code of UE4 roughly, and set breakpoint and check the call stack, and I found the class FWindowsCursor
only called in constructor of class FWindowsApplication
(derived from GenericApplication
) which is created by FSlateApplication
. I have poor knowledge about this framework and what FSlateApplication
is, and I’m not a native English speaker, I 'm confused with the term “Slate”. Upon the above analysis, I reached the conclusion that the hardware cursor only take effect when the game is running in the small view port of UE4 editor, is there any problem?
When my solution configuration changed into DebugGame, it works. But symbols of WindowsCursor.cpp are not loaded. I don’t know anything can help, I just state what I did and what I obseved.
All right, is there any mature solution about this? I’m not giving up. A custom hardware cursor is still in my wishing list.
Thanks a lot in advance.
I tried to use Windows lib functions such as LoadImage
and SetCursor
to make it, but the cursor change into native one as soon as I move my mouse. And, of course, it doesn’t work in packaged project.