Comments (5)
I figured out that I had to re-build the solution from within Unreal Engine for VisualStudio to pick up on #include "CGTerrainManager.h"
as a real thing, but SetUpTerrain();
is still not a thing...
from cashgenue.
The method is ACGTerrainManager::SetupTerrain, you need to call it on an instance of CGTerrainManager.
from cashgenue.
Thanks, although it seems I have to provide it with a number of different parameters, which isn't explained in the README.
I've gotten to the point where I'm setting up the noise generation params:
UUFNNoiseGenerator * NoiseGenerator = new UUFNNoiseGenerator();
ACGTerrainManager * TerrainManager = new ACGTerrainManager();
TerrainManager->SetUpTerrain(NoiseGenerator, NoiseGenerator, ?);
But I'm not sure about what the last AActor aTrackingActor
param is supposed to be...
Originally I assumed it would be the player, but the player is a APawn
, so I'm not sure how to get that as an AActor
type.
UWorld * World = GetWorld();
if (World && World->GetFirstPlayerController() != NULL)
{
APawn * Player = World->GetFirstPlayerController()->GetPawn();
FVector PlayerLocation = Player->GetActorLocation();
TerrainManager->SetUpTerrain(NoiseGenerator, NoiseGenerator, ?);
}
Should I cast (AActor *)Player
? Is that reasonable?
As a side note, I am not completely certain if I can do: ACGTerrainManager * TerrainManager = new ACGTerrainManager();
There are no problem indicated in VisualStudio, but when I try to compile in UE4, I get this message:
CompilerResultsLog: Creating library E:\victo\Documents\Projects\Code\ProcTerrainC2\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ProcTerrainC2-8744.suppressed.lib and object E:\victo\Documents\Projects\Code\ProcTerrainC2\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ProcTerrainC2-8744.suppressed.exp
CompilerResultsLog: Error: ProcTerrainC2GameModeBase.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl ACGTerrainManager::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@ACGTerrainManager@@CAPEAVUClass@@XZ) referenced in function "public: virtual void __cdecl AProcTerrainC2GameModeBase::BeginPlay(void)" (?BeginP
lay@AProcTerrainC2GameModeBase@@UEAAXXZ)
CompilerResultsLog: Error: ProcTerrainC2GameModeBase.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl ACGTerrainManager::ACGTerrainManager(void)" (??0ACGTerrainManager@@QEAA@XZ) referenced in function "public: virtual void __cdecl AProcTerrainC2GameModeBase::BeginPlay(void)" (?BeginPlay@AProcTerrainC2GameModeBase@@UEAAXXZ)
CompilerResultsLog: Error: E:\victo\Documents\Projects\Code\ProcTerrainC2\Binaries\Win64\UE4Editor-ProcTerrainC2-8744.dll : fatal error LNK1120: 2 unresolved externals
CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: E:\victo\Documents\Projects\Code\ProcTerrainC2\Binaries\Win64\UE4Editor-ProcTerrainC2-8744.dll
from cashgenue.
I'm nearly finished with the multiplayer branch and will be merging to master in the next couple of days. This should hopefully be the last significant API change.
The code steps should be simpler, just one step:
- Call SetupTerrainGenerator with the various struct attributes/noise generators
Any Actors that you have given a TerrainTrackerComponent to will take care of registering themselves with the ACGTerrain actor.
fyi - You can't just new an AActor, you have to use World::SpawnActor
from cashgenue.
See the latest README.md
https://github.com/midgen/cashgenUE
from cashgenue.
Related Issues (20)
- Add instanced water plane HOT 1
- Collision in packaged version HOT 2
- Crash after approx 40 seconds playing. HOT 2
- Can the terrrian generate from not just heightmap. HOT 1
- UE4.20.3 - Black texture HOT 5
- Event OnTerrainComplete HOT 1
- Random craters HOT 1
- Is there a way to directly use the height map and replace the height map in real time? HOT 1
- 4.17 not work cannot Compile HOT 1
- Collision between tiles HOT 1
- Default LoadingPhase causing editor to "forget" all CG-elements HOT 2
- How to Spawn Foliage HOT 1
- Refactor to support RuntimeMeshComponent v4.0 HOT 3
- Compile errors HOT 3
- UnrealHeaderTool Compile error HOT 4
- Repo has no license HOT 1
- creating flat landscape HOT 1
- please add "enable plugins" to installation process
- Implementing / set up foliage HOT 1
- Building Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cashgenue.