Hi.
First of great work!
[HR][/HR]
I’m trying to port my game to Linux, using cross platform tools. Packing goes well, but when I try to run game on Linux I’m getting error in terminal.
[2017.05.22-11.12.02:360] 0]LogProperty:Error: Struct type unknown for property 'StructProperty /Game/Blueprints/VRPlayerController.VRPlayerController_C:ExecuteUbergraph_VRPlayerController.CallFunc_VictoryGetAllActionKeyBindings_Bindings.CallFunc_VictoryGetAllActionKeyBindings_Bindings'; perhaps the USTRUCT() was renamed or deleted?
I’m using UE4.14, windows version of game works well.
Hey !
Firstly your plugin is awesome!
I also bought your save plugin, **** good plugin!
I got one quick question.
I was looking for a way to spawn actor in sublevels, and I saw your plugin supports that.
However, you can’t pass parameters like original SpawnActorFromClass did.
I did some research, and it is possible to archive what I wanted but I need to modify engine source code and recompile engine.
Since other members of my team use precompiled version from Launcher so the only option for me is to write a plugin.
But I found that if I write a plugin, I need to access UGameplayStatics.h which is not possible.
So is a dead end, right?
My question is, is it possible to write a plugin let original SpawnActorFromClass supports spawning in sublevels?
Not (I wish), but I tried the same thing as you. In my experience you have two options.
Copy the code from the VictoryPlugin, for the spawn node, in your own C++ function library and modify it:
AC_Building* UC_FunctionLibrary::SpawnBuildingIntoLevel(UObject* WorldContextObject, TSubclassOf<AC_Building> BuildingType, ESpawnActorCollisionHandlingMethod CollisionOverride, FTransform const SpawnTransform, int32 CityIndex, EBuildingTier BuildingTier, bool IsAlive, bool PhysicsEnabled, bool IsTwin, AActor* Owner)
{
if (!GEngine)
{
UE_LOG(LogCore, Error, TEXT("FAILED: %s - SpawnBuildingIntoLevel -> GEngine is not valid!"), *WorldContextObject->GetName());
return nullptr;
}
if (!BuildingType)
{
UE_LOG(LogCore, Error, TEXT("FAILED: %s - SpawnBuildingIntoLevel -> BuildingType is not valid!"), *WorldContextObject->GetName());
return nullptr;
}
//using a context to get the world!
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
if (!World)
{
UE_LOG(LogCore, Error, TEXT("FAILED: %s - SpawnBuildingIntoLevel -> World is not valid!"), *WorldContextObject->GetName());
return nullptr;
}
//Create SpawnParameters
FActorSpawnParameters SpawnParameters;
SpawnParameters.SpawnCollisionHandlingOverride = CollisionOverride;
SpawnParameters.bDeferConstruction = true;
SpawnParameters.bAllowDuringConstructionScript = false;
SpawnParameters.Owner = Owner;
//Get Level from Name based on CityIndex.
ULevel* FoundLevel = nullptr;
FString LevelName = GetGameSettings()->CityPrefix;
LevelName += DoubleDigitInt(CityIndex);
for (const ULevelStreaming* EachLevel : World->StreamingLevels)
{
if (!EachLevel) continue;
//~~~~~~~~~~~~~~~~
ULevel* LevelPtr = EachLevel->GetLoadedLevel();
//Valid?
if (!LevelPtr) continue;
FString x = EachLevel->GetWorldAssetPackageName();
//
x = x.Right(7);
if (x == LevelName)
{
FoundLevel = LevelPtr;
break;
}
}
//~~~~~~~~~~~~~~~~~~~~~
if (FoundLevel)
{
SpawnParameters.OverrideLevel = FoundLevel;
}
//~~~~~~~~~~~~~~~~~~~~~
AC_Building* SpawnedBuilding = nullptr;
//World->SpawnActorDeferred<BuildingType>(BuildingType, &, &, nullptr, nullptr, false);
//World->SpawnActor(SpawnParameters);
SpawnedBuilding = World->SpawnActor<AC_Building>(BuildingType, SpawnTransform.GetLocation(), SpawnTransform.Rotator(), SpawnParameters);
//SpawnedBuilding = World->SpawnActorDeferred<AC_Building>(BuildingType, SpawnTransform);
if (SpawnedBuilding)
{
SpawnedBuilding->SetCityIndex(CityIndex);
SpawnedBuilding->BuildingTier = BuildingTier;
SpawnedBuilding->isAlive = IsAlive;
SpawnedBuilding->isBuildingTwin = IsTwin;
SpawnedBuilding->PhysicsEnabled = PhysicsEnabled;
UGameplayStatics::FinishSpawningActor(SpawnedBuilding, SpawnTransform);
}
else
{
UE_LOG(LogCore, Error, TEXT("FAILED: %s - SpawnBuildingIntoLevel -> SpawnedBuilding failed to spawn!"), *WorldContextObject->GetName());
return nullptr;
}
return SpawnedBuilding;
}
Use the default spawning node and assign an actor that already is in that sublevel as the “Owner”. will set the spawn actor as part of that sublevel as well. <- I did by accident and seemed to work.
Thought I’d mention that there are some warnings when building a project:
"UnrealBuildTool: H:\Unreal Projects\MyGame\Plugins\VictoryPlugin\Source\VictoryBPLibrary\Public\VictoryBPFunctionLibrary.h(867): warning C4996: ‘FBox::FBox’: Use ForceInit constructor instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
"
Thanks for continuing to work on , . Some of your nodes (Set Mouse Position, Unload Streaming Level, etc.) are essential and really should be included in the core engine library by default.
Crazy question (which I’ve tried to google with no definitive answer) but can plugin (or others) be packaged to run on Android/iOS? I know there might be some tweaking in the uplugin file but if it is an engine plugin it should be doable?
**Download Links**
**4.16 Build (win32, win64, editor, dev packaged, and shipping)**
https://www.mediafire.com/?ieovbd5l9d7yub2
♥ Please note I now use the UE4 Marketplace C++ Plugin Standard when packaging Victory plugin for you ♥
1. Win64 Development
2. Win64 Shipping **<~~~~~~ NEW!**
3. Win32 Development
4. Win32 Shipping
Please see my instructions for [Packaging UE4 Plugins With Your Game](https://forums.unrealengine.com/showthread.php?3851-(39)--s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=476476&viewfull=1#post476476).
Hi, is there any current issues with packaging Linux Dedicated Servers? I am getting error. I have the plugin in runtime and have built the game with visual studio.
Hey! First off awesome plugin, thanks you so much!
I’m trying to use the Load Texture 2D From File function, but it seems like the texture group is always the default one(World), and I want it to be 2D Pixels (Unfiltered). Any ideas about how I can do that?