-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from qiuwch/master
Update UnrealCV to v0.3.0
- Loading branch information
Showing
99 changed files
with
2,575 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,7 @@ | |
Binaries/ | ||
Intermediate/ | ||
Config/ | ||
built/ | ||
|
||
*.ipynb_checkpoints/ | ||
core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: python | ||
install: | ||
- pip install unrealcv | ||
script: | ||
script: | ||
python test/test-unrealcv.py --travis |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
all: | ||
python client/scripts/build-plugin.py --engine_path ${UnrealEngine} --dev | ||
UE4Version=4.13 | ||
precompiled=unrealcv-$(shell python client/scripts/get-version.py)-$(UE4Version).zip | ||
package: | ||
# Package plugin to a zip file | ||
rm -rf built/Intermediate | ||
cd built && zip -r ../${precompiled} * | ||
|
||
rebuild: | ||
rm -rf built/ | ||
sh build.sh | ||
|
||
clean: | ||
rm -rf Intermediate/ Binaries/ built/ |
Submodule libprotobuf
added at
8d4239
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "UnrealCVPrivate.h" | ||
#include "ActionHandler.h" | ||
|
||
void FActionCommandHandler::RegisterCommands() | ||
{ | ||
FDispatcherDelegate Cmd; | ||
FString Help; | ||
|
||
Cmd = FDispatcherDelegate::CreateRaw(this, &FActionCommandHandler::PauseGame); | ||
Help = "Pause the game"; | ||
CommandDispatcher->BindCommand("vset /action/game/pause", Cmd, Help); | ||
|
||
/* | ||
Cmd = FDispatcherDelegate::CreateRaw(this, &FActionCommandHandler::ResumeGame); | ||
Help = "Resume the game"; | ||
CommandDispatcher->BindCommand("vset /action/game/resume", Cmd, Help); | ||
*/ | ||
} | ||
|
||
FExecStatus FActionCommandHandler::PauseGame(const TArray<FString>& Args) | ||
{ | ||
APlayerController* PlayerController = GWorld->GetFirstPlayerController(); | ||
PlayerController->Pause(); | ||
return FExecStatus::OK(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
#include "CommandHandler.h" | ||
|
||
class FActionCommandHandler : public FCommandHandler | ||
{ | ||
public: | ||
FActionCommandHandler(FCommandDispatcher* InCommandDispatcher) : FCommandHandler(InCommandDispatcher) | ||
{} | ||
void RegisterCommands(); | ||
|
||
/** vset /action/game/pause */ | ||
FExecStatus PauseGame(const TArray<FString>& Args); | ||
|
||
/** vset /action/game/resume */ | ||
FExecStatus ResumeGame(const TArray<FString>& Args); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "UnrealCVPrivate.h" | ||
#include "AliasHandler.h" | ||
|
||
void FAliasCommandHandler::RegisterCommands() | ||
{ | ||
FDispatcherDelegate Cmd; | ||
FString Help; | ||
|
||
Cmd = FDispatcherDelegate::CreateRaw(this, &FAliasCommandHandler::VRun); | ||
Help = "Run UE4 built-in commands"; | ||
CommandDispatcher->BindCommand("vrun [str]", Cmd, Help); | ||
CommandDispatcher->BindCommand("vrun [str] [str]", Cmd, Help); | ||
CommandDispatcher->BindCommand("vrun [str] [str] [str]", Cmd, Help); | ||
} | ||
|
||
FExecStatus FAliasCommandHandler::VRun(const TArray<FString>& Args) | ||
{ | ||
FString Cmd = ""; | ||
|
||
uint32 NumArgs = Args.Num(); | ||
for (uint32 ArgIndex = 0; ArgIndex < NumArgs-1; ArgIndex++) | ||
{ | ||
Cmd += Args[ArgIndex] + " "; | ||
} | ||
Cmd += Args[NumArgs-1]; | ||
UWorld* World = FUE4CVServer::Get().GetGameWorld(); | ||
check(World->IsGameWorld()); | ||
|
||
APlayerController* PlayerController = World->GetFirstPlayerController(); | ||
PlayerController->ConsoleCommand(Cmd, true); | ||
return FExecStatus::OK(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
#include "CommandHandler.h" | ||
|
||
class FAliasCommandHandler : public FCommandHandler | ||
{ | ||
public: | ||
FAliasCommandHandler(FCommandDispatcher* InCommandDispatcher) : FCommandHandler(InCommandDispatcher) | ||
{} | ||
void RegisterCommands(); | ||
|
||
/** vrun * */ | ||
FExecStatus VRun(const TArray<FString>& Args); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.