mirror of
https://github.com/kuhyx/praca_magisterska.git
synced 2026-07-04 16:43:12 +02:00
4.5 KiB
4.5 KiB
Appendix B: Troubleshooting
← Appendix A: Variables | Back to Index | Appendix C: Unity Conversion →
Player doesn't move
Click to expand solutions
- Verify IMC_Default Input Mapping Context is added in BeginPlay
- Check that IA_Move Input Action exists and has correct key bindings
- Ensure "Possess" is called on player pawn (automatic with GameMode)
- Verify MoveSpeed > 0
- Check if blueprint has errors (Compile button should be green checkmark)
- Make sure Enhanced Input plugin is enabled (Edit → Plugins → Enhanced Input)
- CRITICAL: Verify Project Settings → Input → Default Classes are set to Enhanced Input
Bullets don't spawn
Click to expand solutions
- Check BulletClass variable is set to BP_Bullet
- Verify SpawnActor node has valid class
- Check that fire logic is connected to execution flow
- Ensure the FireVolley function is connected to the fire rate limiter
- Verify BP_Bullet blueprint compiles without errors
No collisions detected
Click to expand solutions
- Verify collision components have "Generate Overlap Events" checked
- Check collision channels are set correctly
- Ensure "Collision Enabled" is set to "Query Only" or "Query and Physics"
- Verify both actors have collision components (not just one)
- Check that the Cast To nodes succeed (add print statements to debug)
UI doesn't appear
Click to expand solutions
- Check HUD widget is created and added to viewport
- Verify ScoreManager is in the level
- Check widget blueprint compiles without errors
- Ensure "Add to Viewport" node is connected in execution flow
- Verify text color is visible against background (try white text)
Enemies don't spawn
Click to expand solutions
- Check EnemyClass is set in Spawner
- Verify SpawningActive is true
- Check spawn position is within camera view
- Ensure BP_EnemySpawner is placed in the level
- Verify the SpawnCurve asset is assigned
Game runs too fast/slow
Click to expand solutions
- All movement should multiply by DeltaSeconds
- Check speed values (may need adjustment for Unreal scale)
- Unreal uses centimeters; multiply Unity values by ~100
- Verify no duplicate Event Tick processing
- Check frame rate (use
stat fpsconsole command)
Input works in editor but not in packaged build
Click to expand solutions
- Ensure all Input Actions and IMC_Default are saved
- Check that assets are not in a "Developer" folder (excluded from builds)
- Verify Project Settings input classes are set correctly
- Try clearing Saved and Intermediate folders, then rebuild
Blueprint won't compile
Click to expand solutions
- Look at the Compiler Results panel for specific errors
- Check for circular references between blueprints
- Ensure all required inputs are connected
- Verify variable types match (no type mismatches)
- Look for "Access None" errors (null references)
Camera doesn't show the game correctly
Click to expand solutions
- Verify camera position:
X=0, Y=0, Z=1000 - Verify camera rotation:
X=-90, Y=0, Z=0(looking down) - Check "Auto Activate for Player" is enabled
- For orthographic: Set Projection Mode and Ortho Width
- Ensure no other cameras are taking priority
General Debugging Tips
Enable Print Statements
Right-click → Print String → Type message
Add these throughout your blueprints to track execution flow.
Check Output Log
- Window → Developer Tools → Output Log
- Shows blueprint errors, warnings, and print statements
Use Breakpoints
- Right-click any blueprint node → Add Breakpoint
- Execution pauses at that point during Play mode
- Step through with F10/F11
Visualize Collisions
- In viewport: Show → Collision
- Shows collision shapes in play mode
Console Commands
- Press
~(tilde) to open console stat fps- Show frame rateshow collision- Toggle collision visualization
← Appendix A: Variables | Back to Index | Appendix C: Unity Conversion →