x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Custom hardware cursor doesn't work in packaged project.

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.

Product Version: UE 4.19
Tags:
more ▼

asked Jun 25 '18 at 06:51 AM in Using UE4

avatar image

婪 丶
28 4 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Did you check if your cursor images are being packaged? I read somewhere that putting them inside a directory called Slate means they're automatically picked up for packages. Otherwise you might need to add the directory in which you're storing them to the list of locations to package.

more ▼

answered Jun 26 '18 at 05:44 PM

avatar image

byg_ben
31 2 5

avatar image 婪 丶 Jun 27 '18 at 07:18 AM

Oh god! It works! I put my cursor images in folder content/slate and modify cursor path in User Interface as what you said.alt text Here's what you a discernment man said!

avatar image 婪 丶 Jun 27 '18 at 07:23 AM

Do you have any idea about why cursors sometimes still perform the native styles when the game loads? My custom cursor shows after I switch into some other windows and refocus the game windows.

avatar image 婪 丶 Jun 27 '18 at 07:45 AM
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question