This is just a list of random tips I’m going to be adding to over time. Especially for dumb things I get stuck on.
Don’t use get player controller when you’re in the controller. Just use “Self”
cause “Get Player Controller” just returns whatever player controller is at that index regardless of who calls the code
self will just do that controller invoking it
You can use “Set input mode game only” if widgets or previous menus won’t give you player control back
if you in player character then -> get controller -> cast to bp player controller
if you in hud then → get owning player → cast to bp…
Destructible meshes
about 9-12 physics objects saturates network
like that isnt a hard limit, its just what i found when i went through a phase of stress testing ue4
tbh they need a better system, destrucible meshes are ****, they dont replicate AT ALL, and you crash the engine if you try to cast to a fractured bit
oh yeah thats top tip too
dont cast to broken bits
or apply damage twice
Copying projects
my workflow is copy the project, go to copied one and delete all **** in content folder. then migrate files. then delete all **** that you didnt want to migrate in copied folder. then open, check it works, and if it does migrate that into new project
copy and paste in explorer works often but make sure you back it up sometimes it really doesnt, and make sure you put it in the right folder
also if you ever forget what folder a blueprint should be in - open it in notepad++ you can see the directory
1000 AI > https://www.youtube.com/watch?v=TW7VaWZYY0k&feature=youtu.be&t=53s
funny thing is that would work well in mp
it was just find path -> store array -> move to in ai char BP
no ai tree or anything
only good for tower defense though
or moba
you would only need to replicate the spawning, everything else would be calculated on everyones pc
its so simple that the queries would all be the same
you could replicate location and set the replicate frequence super super low
thats the option that epic put in for moba Screenshot - 47e54f1cddd29619109e6334354c69f1 - Gyazo
Optimization
draw calls
your graphics card renders polys, but each texture needs to be loaded via cpu with draw call
i did a rollercoaster track in unreal with over 2500000 polys ran great, only used a couple textures though
when you’re debugging, run stat unit in console
you’ll see gpu and draw
those are your render cost = gpu, draw calls = draw, and actual code exec load = game
whichever is highest is the bottleneck
Moving C++ project over to bp project that’s just using plugins
create an empty BP only project, copy across the configs, copy the content folder, then open it and fix project settings
mostly just export your inputs and collision settings
Resaving multiple same type files
A quick way of doing the enums is click content folder, search 'enum" then highlight all -> right click -> save