mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Tweaked images a little and reduced game instance discussion in root
This commit is contained in:
parent
b56b9e65b8
commit
0b26f9b937
23
ReadMe.md
23
ReadMe.md
@ -70,28 +70,11 @@ you can tap into anywhere in Blueprints by searching for it:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
Once you have access to this you can do things like tie events into the input mode
|
Once you have access to this you can do things like get the latest input device used:
|
||||||
changing:
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To access this in C++, just do this:
|
|
||||||
|
|
||||||
```c++
|
|
||||||
#include "StevesUEHelpers.h"
|
|
||||||
|
|
||||||
...
|
|
||||||
auto GS = GetStevesGameSubsystem(GetWorld());
|
|
||||||
if (GS)
|
|
||||||
{
|
|
||||||
// get current mode (first player assumed)
|
|
||||||
EInputMode CurrentInputMode = GS->GetLastInputModeUsed();
|
|
||||||
// Subscribe to input mode changes (remember this must be a UFUNCTION)
|
|
||||||
GS->OnInputModeChanged.AddUniqueDynamic(this, &AMyActor::OnInputModeChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
For more details, see the [Input section](doc/Input.md).
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 118 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 38 KiB |
BIN
Resources/inputchangeevent.png
Normal file
BIN
Resources/inputchangeevent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 44 KiB |
@ -34,7 +34,7 @@ EInputMode Mode = GS->GetLastInputModeUsed(PlayerIndex);
|
|||||||
|
|
||||||
Blueprint:
|
Blueprint:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
C++:
|
C++:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user